Connecting Tech Pros Worldwide Help | Site Map

Passing information to a new window in .NET

  #1  
Old July 23rd, 2005, 08:50 PM
vinojairath@gmail.com
Guest
 
Posts: n/a
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,heigh t=400,top=0,eft=0");

}
</script>

onclick="javascript:openwindow('my.aspx')"

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

Thanks, V.

  #2  
Old July 23rd, 2005, 08:50 PM
SCDeveloper
Guest
 
Posts: n/a

re: Passing information to a new window in .NET


Add the parameters to the onclick line.

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

onclick="javascript:openwindow*('my.aspx?ID=123&te st=yes')"
or
onclick="javascript:openwindow*('my.aspx?ID=" + ID.value + "&test="+
test.value + "')"

SCDeveloper
http://www.sharingcorner.com

  #3  
Old July 23rd, 2005, 08:50 PM
vinojairath@gmail.com
Guest
 
Posts: n/a

re: Passing information to a new window in .NET


Thanks.

  #4  
Old July 23rd, 2005, 08:50 PM
Tony
Guest
 
Posts: n/a

re: Passing information to a new window in .NET



<vinojairath@gmail.com> wrote in message
news:1116247818.371276.114700@g14g2000cwa.googlegr oups.com...[color=blue]
>
>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,locati on=no,directories=no,status=no,menubar=no,scrollba rs=yes,resizable=yes,copyhistory=yes,width=400,hei ght=400,top=0,eft=0");
>
> }
> </script>
>
> onclick="javascript:openwindow('my.aspx')"
>
>But I do I pass the information from one page to the other?[/color]

Is there a particular reason for doing this in JavaScript, when you could do
it completely from the aspx?

Are you using VB or C#?


  #5  
Old July 23rd, 2005, 08:51 PM
vinojairath@gmail.com
Guest
 
Posts: n/a

re: Passing information to a new window in .NET



I'm using C#.

Do I not need the script to open a new window?

  #6  
Old July 23rd, 2005, 09:00 PM
Thomas 'PointedEars' Lahn
Guest
 
Posts: n/a

re: Passing information to a new window in .NET


vinojairath@gmail.com wrote:
[color=blue]
> [...]
> Do I not need [...] to open a new window?[/color]

Yes, you do not.


PointedEars
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 08:57 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 07:46 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 03:55 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 5 November 14th, 2005 12:36 PM