Leave a comment...
- 4 Comments
Is the panel inside the update panel that's refreshing? Is your call to $addHandler inside pageLoad?#1; Sun, 06 Jan 2008 05:42:00 GMT
Can you post some code..
So it will help to resolve the issue...#2; Sun, 06 Jan 2008 05:43:00 GMT
I have this in thePage_PreRender event:
'Run script each postback, even partial page postbacks
ScriptManager1.RegisterClientScriptInclude(Me.Page, Me.GetType, "frmPics.aspx.js", "frmPics.aspx.js")
My js file has a bunch of functions in it and this outside of a function...
// add Handlers for drop event$addHandler($get('Panel1'),"drop", AlertWhenDropped1);
Thank the Lord I think I got it. I had to do this:
'Run script each postback, even partial page postbacksScriptManager1.RegisterClientScriptInclude(UpdatePanel1,GetType(UpdatePanel),"frmPics.aspx.js","frmPics.aspx.js")
'Must run this or the handler's won't get added on asyncpostbackDim scriptStringAs String ="<script> "
scriptString +=" $addHandler($get('Panel1'), 'drop', AlertWhenDropped1); "scriptString += "</script>"
ScriptManager1.RegisterStartupScript(UpdatePanel1, GetType(UpdatePanel), "justTesting", scriptString,False)#4; Sun, 06 Jan 2008 05:45:00 GMT