javascript - Pop Up Window Not Display -


why below code not functioning registering on html source code?

page.clientscript.registerstartupscript(page.gettype(), "pop", pops); 

below complete code. below intended display popup window. on other pages, pop window displaying using same line of code. i'm sure id of modal existing on html snippet

public static void showmodaldialog(page page, string modalname = "mymodal", int modalwidth = 560)         {             string pops = string.empty;                  pops = "<script language='javascript'>" +                              "$('#" + modalname + "').modal('toggle').css({ 'width': '" + modalwidth + "px', 'margin-left': function () { return -($(this).width() / 2); } });" +                              "</script >";                page.clientscript.registerstartupscript(page.gettype(), "pop", pops);         } 

try registerclientscriptblock method

page.clientscript.registerclientscriptblock(page.gettype(), "pop", pops); 

Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

sql - The object name contains more than the maximum number of prefixes. The maximum is 2 -

Java Web Service Soap fault exception client -