Wednesday, March 28, 2012

UpdatePanel

I am new to Ajax so please be patient. I have created a modal popup. The control has a simple textbox, button and gridview. When the user enters the search criteria the gridview is bound to a dataset with the results. There is a column in the grid that is a linkcolumn that is used to determine which result the user selected. The selected row info is placed into session in the code-behind click event, then there is a label on the form that kicks off javascript. This was all working well. I put all the controls into an updatepanel and everything is working great except the firing the javascript by placing the js code into the label. The Javascript never executes? Any help would be much appreciated.

Have you debug your code why javascript is not executing...

You can use RegisterClientScriptBlock Method to execute javascript..

See for more details...

http://ajax.asp.net/docs/mref/O_T_System_Web_UI_ScriptManager_RegisterClientScriptBlock.aspx


No luck. I am attempting to inject the javascript from code-behind into a label control. The label control is never updated with the Update Panel in place. Before the Update Panel this solution worked fine. I can put a button control on the page and it will execute the js fine. The big problem I see is getting the label text to update with the script.


Can you provide code details...

So if possible I'll try to find what exactly happens...

No comments:

Post a Comment