Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > URL Params

Reply
Thread Tools

URL Params

 
 
=?Utf-8?B?Q29uZWVjdGlvbiBPTEFQ?=
Guest
Posts: n/a
 
      02-11-2005
Hi:

Me question is the next:

I would like know how, I can do it to pass params, from a control of a page
ASPX to other page ASPX, but I don't want that this params can see in the
URL, besides I want use this params in the page, how I can do it to request
this params...??

I am using C# like languaje...

Thanks....!!!
 
Reply With Quote
 
 
 
 
Stefano
Guest
Posts: n/a
 
      02-11-2005
Hi,

you can make a POST.

ASP.NET 2.0 will fill this needs out-of-the-box.

In ASP.net 1.x this is not very simple. You need a workaround to do that.

You can play with JavaScript (that could be rendered from the server as
RegisterStartupScript), changing the "action" property of the <form>
rendered with the webform, to point it to your second aspx file, and then
call submit method.

<input type="hidden" id="yourhiddenfield" name="yourhiddenfield" />
<script language="javascript">
document.forms[0].action = "yourotherpage.aspx";
document.all["yourhiddenfield"].value = "foo";
document.forms[0].submit();
</script>

In yourotherpage.aspx:
....
string myvalue = Request["yourhiddenfield"];

HTH

Bye

Stefano

"Coneection OLAP" <> ha scritto nel
messaggio news:C77B3755-EA8A-407B-A2B1-...
> Hi:
>
> Me question is the next:
>
> I would like know how, I can do it to pass params, from a control of a

page
> ASPX to other page ASPX, but I don't want that this params can see in the
> URL, besides I want use this params in the page, how I can do it to

request
> this params...??
>
> I am using C# like languaje...
>
> Thanks....!!!



 
Reply With Quote
 
 
 
 
Joerg Jooss
Guest
Posts: n/a
 
      02-11-2005
Stefano wrote:

> Hi,
>
> you can make a POST.


You can also make your life hell. With POST, all requests become not
repeatable (-> browser warning on back button) and (in theory) non
cacheable. If that's what is desired -- fine. Otherwise forget about
using POST as the normal way to move from page to page *unless* you are
really submitting a form.

Cheers,

--
http://www.joergjooss.de
mailto:news-
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
params v.s. @params in rails? Barry Ruby 9 09-15-2005 03:12 AM
newbie: How can I retrieve the params placed in URL Jeff ASP .Net 4 05-08-2005 08:16 AM
Is there a URL Params class? Ken Varn ASP .Net 2 04-29-2005 07:22 PM
databind expression for url with 2 params? Martin ASP .Net 3 06-04-2004 09:54 AM
getting rid of params in url dario ASP .Net 0 02-20-2004 01:41 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57