Solved

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

Posted on 2007-11-21
3
13,377 Views
Last Modified: 2013-11-26
Hello Experts,
From the code behind in 1 page, I need to open another aspx file in a modal window.  

Thanks

Howard
0
Comment
Question by:katzhoward
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
SQL_SERVER_DBA earned 250 total points
ID: 20329060
function OpenAnother()
{
window.showModelessDialog( "RequestForm.aspx");
}
0
 
LVL 12

Expert Comment

by:needo_jee
ID: 20329180
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
 
LVL 12

Assisted Solution

by:needo_jee
needo_jee earned 250 total points
ID: 20329286
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Server Error 11 47
C#  Radio button search for Date not DateTime 4 35
jQuery not working on ELSE... why? 2 22
wordpress display sub menu only when click 12 23
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now