safest way to pass parameters between pages

Discussion in 'ASP .Net' started by Aussie Rules, Oct 9, 2007.

  1. Aussie Rules

    Aussie Rules Guest

    Hi,

    I have a few aspx (.net2) form.

    The first form allows the user to enter into text box, and select values
    from drop downs

    The second form needs to use these values to process some data.

    I am currently using the url to pass the values such as
    'pagename.aspx?parm1=value&param2=value, and the second form does a
    request.headers("parm1")

    However this exposes the values in the browser, and I don't want this.

    Is there a way to do this where its hidden from the user ?

    Thanks
    Aussie Rules, Oct 9, 2007
    #1
    1. Advertising

  2. "Aussie Rules" <> wrote in message
    news:...

    > I have a few aspx (.net2) form.
    >
    > The first form allows the user to enter into text box, and select values
    > from drop downs
    >
    > The second form needs to use these values to process some data.
    >
    > I am currently using the url to pass the values such as
    > 'pagename.aspx?parm1=value&param2=value, and the second form does a
    > request.headers("parm1")
    >
    > However this exposes the values in the browser, and I don't want this.
    >
    > Is there a way to do this where its hidden from the user ?


    Generally speaking, in ASP.NET there is no need to use two forms for this -
    that is what a postback is for...

    When the user clicks the <asp:Button>, the form will postback and the values
    in the textboxes will be available for you to do your processing.
    Afterwards, you can redirect to another page if you like, but there's no
    need to...

    http://www.google.co.uk/search?sour...=1T4GGIH_en-GBGB220GB220&q="ASP.NET" postback


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Oct 9, 2007
    #2
    1. Advertising

  3. Where did you get this "request.headers("parm1") stuff?
    Your stuff is on the QueryString. You would get it with
    Request.QueryString("parm1") or
    Request.Params("parm1")

    -- Peter
    Recursion: see Recursion
    site: http://www.eggheadcafe.com
    unBlog: http://petesbloggerama.blogspot.com
    BlogMetaFinder: http://www.blogmetafinder.com



    "Aussie Rules" wrote:

    > Hi,
    >
    > I have a few aspx (.net2) form.
    >
    > The first form allows the user to enter into text box, and select values
    > from drop downs
    >
    > The second form needs to use these values to process some data.
    >
    > I am currently using the url to pass the values such as
    > 'pagename.aspx?parm1=value¶m2=value, and the second form does a
    > request.headers("parm1")
    >
    > However this exposes the values in the browser, and I don't want this.
    >
    > Is there a way to do this where its hidden from the user ?
    >
    > Thanks
    >
    >
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Oct 9, 2007
    #3
  4. Hi Aussie,

    Generally, for share data between web pages, you can use querystring,
    session, database ........ However, for ASP.NET 2.0 page, it also provide
    some particular features, such as the cross page postback(if you are using
    submit/postback to redirect to other page). Or you can use Server.Transfer
    to redirect page and use HttpContext.Items collection to store temp data.
    Here is a msdn reference mentioend some of them:

    #How to: Pass Values Between ASP.NET Web Pages
    http://msdn2.microsoft.com/en-us/library/6c3yckfw(VS.80).aspx

    BTW, do you think the suggestion that use single page with postback from
    other members also possible for your case?

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------
    >From: "Aussie Rules" <>
    >Subject: safest way to pass parameters between pages
    >Date: Tue, 9 Oct 2007 00:22:22 +0100


    >Hi,
    >
    >I have a few aspx (.net2) form.
    >
    >The first form allows the user to enter into text box, and select values
    >from drop downs
    >
    >The second form needs to use these values to process some data.
    >
    >I am currently using the url to pass the values such as
    >'pagename.aspx?parm1=value&param2=value, and the second form does a
    >request.headers("parm1")
    >
    >However this exposes the values in the browser, and I don't want this.
    >
    >Is there a way to do this where its hidden from the user ?
    >
    >Thanks
    >
    >
    Steven Cheng[MSFT], Oct 9, 2007
    #4
    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. Replies:
    7
    Views:
    1,556
  2. rbt
    Replies:
    3
    Views:
    349
    Fredrik Lundh
    Feb 14, 2005
  3. Joseph Turian
    Replies:
    2
    Views:
    314
    Daniel Bickett
    Jul 27, 2005
  4. H5N1
    Replies:
    0
    Views:
    621
  5. J. Shane Kunkle

    Safest way to pass data between web apps?

    J. Shane Kunkle, Mar 11, 2005, in forum: ASP .Net Security
    Replies:
    4
    Views:
    459
    Paul Glavich [MVP ASP.NET]
    Mar 14, 2005
Loading...

Share This Page