Passing information to a new window in .NET

V

vinojairath

Hi,

This is my first-time posting, so apologies if format etc. is not
correct.

I have a my.aspx page containing fields that have been manually
populated (e.g. a textbox). With a click of a button I want another
my.apsx window to open populated with the same information.

I found the following Javascript to open a new window:

<script type="text/javascript">
function openwindow(ipt)
{

window.open(ipt,"new_window","­toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=400,height=400,top=0,eft=0");

}
</script>

onclick="javascript:eek:penwindow('my.aspx')"

But I do I pass the information from one page to the other?

Thanks, V.
 
S

SCDeveloper

Add the parameters to the onclick line.

For examples, two parameters, ID and test, are passed to the page.

onclick="javascript:eek:penwindow­('my.aspx?ID=123&test=yes')"
or
onclick="javascript:eek:penwindow­('my.aspx?ID=" + ID.value + "&test="+
test.value + "')"

SCDeveloper
http://www.sharingcorner.com
 

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

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top