Calling javascript from code behind

后端 未结 2 1505
粉色の甜心
粉色の甜心 2020-11-28 17:02

I have a c# asp.net 3.5 app I am trying to open a window from code behind after a certain event. I have this but its not working and there are no errors in firebug



        
2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-28 17:31

    Assuming that the pre-conditions are true. You need to pass an additional parameter to the RegisterClientStartupScript method call to indicate that scriptTags need to be added.

    Page.ClientScript.RegisterStartupScript(this.GetType(), "openCredentials", string.Format("radopen('Services.aspx?clientId={0}, Window_Services')", openCredentialsWindow_ClientId.ToString()),true);
    

提交回复
热议问题