Last post Aug 02, 2007 09:02 AM by suprej
Aug 02, 2007 08:51 AM|loydall|LINK
I want to call this function x amount of times passing a different value to each time based on the contents of a database.
I'm obviously doing my database call from my code-behind and returning a load of results.
This needs to be done on the page Load.
Aug 02, 2007 09:01 AM|somnathmali|LINK
To which control you are bindind the data...
Suppose you are using the DataGrid. Then you can use ItemDataBound event.
- In this Event is if e.ItemType is Item then ..
- Same , You can get the valueToSend from any Hidden control in the DataGrid ( suppse ID )
- Set the ctrl.Attributes.Add( "obclick" , "functionName('" + valueToSend + "' )");
Aug 02, 2007 09:02 AM|justKiran|LINK
You can do the same as follows,
in your case, you just have to write inside loop.
Aug 02, 2007 09:02 AM|suprej|LINK
This shows how to register javscript scripts from the code behind.
Please let us know whether you have any other method in mind.