c# - Facing Issue with ShowModalDialog -


i want display webpage modal popup.

response.write("<script type='text/javascript'>detailedresults=window.showmodaldialog('newfile.aspx','data','left=(screen.width) ? (screen.width - 800) / 2 : 0,top=(screen.height) ? (screen.height - 700) / 2 : 0,width=1000,  height=500, toolbar=no, menubar=no, titlebar=no, location=no, addressbar=no');</script>"); 

while using above code. able display web page modal popup, issue opens third window web page of same name , not modal popup.

please me in resolving issue. in advance.

rather writing script out response use registerstartupscript instead:

page.clientscript.registerstartupscript(this.gettype(),                 "detailedresults",                 "<script type='text/javascript'>detailedresults=window.showmodaldialog('newfile.aspx','data','left=(screen.width) ? (screen.width - 800) / 2 : 0,top=(screen.height) ? (screen.height - 700) / 2 : 0,width=1000,  height=500, toolbar=no, menubar=no, titlebar=no, location=no, addressbar=no');</script>"); 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -