Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 13390
  • Last Modified:

Call javascript function from vb.net code behind in asp.net 2.0 page

Hello Experts,
From the code behind in 1 page, I need to open another aspx file in a modal window.  

Thanks

Howard
0
Howard Katz
Asked:
Howard Katz
  • 2
2 Solutions
 
SQL_SERVER_DBACommented:
function OpenAnother()
{
window.showModelessDialog( "RequestForm.aspx");
}
0
 
Munawar HussainPrincipal Software EngineerCommented:
in code behind use

Response.Write("<script language='Javascript'> window.open('youraspForm.aspx.','name',
'height=255,width=250,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no ,modal=yes');
</script>")
0
 
Munawar HussainPrincipal Software EngineerCommented:
I just tried in C#

string URL = "<script language='Javascript'> window.open('" + ResolveUrl("empDateTest.aspx") + "','name','height=255,width=250,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes');</script>";

        Response.Write(URL);

Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now