URL Params

Discussion in 'ASP .Net' started by =?Utf-8?B?Q29uZWVjdGlvbiBPTEFQ?=, Feb 11, 2005.

  1. 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....!!!
     
    =?Utf-8?B?Q29uZWVjdGlvbiBPTEFQ?=, Feb 11, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?Q29uZWVjdGlvbiBPTEFQ?=

    Stefano Guest

    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:...
    > 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....!!!
     
    Stefano, Feb 11, 2005
    #2
    1. Advertising

  3. =?Utf-8?B?Q29uZWVjdGlvbiBPTEFQ?=

    Joerg Jooss Guest

    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:
     
    Joerg Jooss, Feb 11, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dario

    getting rid of params in url

    dario, Feb 20, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    320
    dario
    Feb 20, 2004
  2. Martin
    Replies:
    3
    Views:
    440
    Saravana [MVP]
    Jun 4, 2004
  3. Ken Varn

    Is there a URL Params class?

    Ken Varn, Apr 29, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    356
  4. Jeff
    Replies:
    4
    Views:
    480
    Mark Rae
    May 8, 2005
  5. Barry
    Replies:
    9
    Views:
    470
    Ara.T.Howard
    Sep 15, 2005
Loading...

Share This Page