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 - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -