Doubt passing values

P

Paulo Roberto

Hi, Im using VS 2005 C# 2.0 and I need to open a new window, using
JavaScript and pass some values...

How can I do that not using the get method QueryString
(file.aspx?name=something)... ???

Some alternatives ? Is it possible to be done ?

Thanks !
 
G

Guest

?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

Paulo said:
Hi, Im using VS 2005 C# 2.0 and I need to open a new window, using
JavaScript and pass some values...

How can I do that not using the get method QueryString
(file.aspx?name=something)... ???

Some alternatives ? Is it possible to be done ?

Thanks !

You can open a new window and post a form to it.

Make a form that posts to a popup:

<form id="PopupForm" action="file.aspx" target="Popup">
<input type="hidden" name="some" />
<input type="hidden" name="more" />
<input type="hidden" name="other" />
</form>

Set the values in the form, open an empty popup, and post the form to it:

var frm = document.getElementById('PopupForm');
frm.some.value = '42';
frm.more.value = 'yeah!';
frm.other.value = '-1';
window.open('','Popup');
frm.submit();

The values sent to the page can be found in the Request.Form collection.
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top