asp.net - How to open aspx web pages on a pop up window -


i'm trying write code open .aspx (in shape of pop window) after clicking linkbutton on .aspx web page(using vb)

protected sub linkbutton1_click(byval sender object, byval e system.eventargs)      handles linkbutton1.click      'what code?  end sub 

not sure how it, can't find popup control or similar.

you can use clientscript.registerstartupscript

in c#

protected void button1_click(object sender, eventargs e) {     string querystring = "test.aspx" ;     string newwin ="window.open('" + querystring + "');";     clientscript.registerstartupscript(this.gettype(), "pop", newwin, true); } 

in vb

protected sub button1_click(byval sender object, byval e eventargs)          dim querystring string = "test.aspx"          dim newwin string = "window.open('" & querystring & "');"         clientscript.registerstartupscript(me.gettype(), "pop", newwin, true)  end sub 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -