Form Loading

J

Jack

Hi,

I have a question relating to form redirection.

Senario: I have an .aspx page (page1.aspx) with a user control. On
this user control there is a hyperlink which opens a new window
(page2.aspx)that displays a table of results. This is fine but I also
want to redirect page1.aspx back to the main page (main.aspx) ath the
same time as opening page2.aspx?

Since clicking on a hyperlink doesn't reload page1.aspx I'm not sure
how redirect it.

Any help would be appreciated.

Cheers,
Jack
 
G

Guest

Hi Jack,
this can be acheived by calling a javascript function on click of the link
like
<a href = "#" onclick = "javascript:DoOpen()">Click</a>
and then write the script for open and redirect in the javascript function
like
function DoOpen()
{
window.open("page2.aspx" ,"","");
location.href = "main.aspx"
}
HTH
srini
 
M

mona

Hi Jack,

In the onClick event of the hyperlink, use javascript to first open the
window, and then redirect this page to the new page. So it'll be like

onClick="document.window.open('page2.aspx');document.location.href='main.aspx';"

HTH

Mona
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top