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
Howard KatzDatabase Report DeveloperAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
SQL_SERVER_DBAConnect With a Mentor Commented:
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 HussainConnect With a Mentor Principal 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
All Courses

From novice to tech pro — start learning today.