My update panel loads a user control, and the goal here is to assign a specific JavaScript function when this happens. I thought this would be done through the Script Manager, although this is not necessary if there is an alternative to html.
The stream is basically the following:
- User presses a button
- Update control panel settings
- Javascript function is called
Many thanks
I already tried RegisterStartupScript(..), although maybe I made a syntax error
if (show)
{
string scriptId = String.Format("{0}:script", ++uniquePopupId);
string scriptTag = String.Format("showPopup({0},{1});", Width, Height);
ScriptManager.RegisterStartupScript(this, this.GetType(), scriptId, scriptTag, true);
}
Decision:
if (show)
{
string scriptId = String.Format("{0}:script", ++uniquePopupId);
string scriptTag = String.Format("showPopup({0},{1});", Width, Height);
ScriptManager.RegisterStartupScript(updPanelChildControl, updPanelChildControl.GetType(), scriptId, scriptTag, true);
}
source
share