newbie navigation/form re-draw issue...

Discussion in 'ASP .Net' started by roger beniot, Apr 6, 2004.

  1. roger beniot

    roger beniot Guest

    I'm trying to figure out how to do something in ASP.NET that used to
    be accomplished by doing a post from one page to another page.

    If a webform as fields for user information (address, name, phone,
    etc) and a submit button... What is the best way in asp.net to
    re-display the information and ask the user to verify the info is
    correct.

    Will I do a post back to the same webform, remove the previous web
    server controls and redraw the page w/ the new information?

    Would it be best to transfer to a new page (via Response.Redirect
    (url) or Server.Transfer (url)) and get the information from the first
    webform?


    thanks,
    roger
    roger beniot, Apr 6, 2004
    #1
    1. Advertising

  2. roger beniot

    Chris Moore Guest

    It's probably easiest to do something like posting the data to a new form
    which will display it to the user and ask for confirmation. You could also
    write your original page to check for whether this is a postback or not,
    and then generate the form's target and the data fields on the fly.
    Assuming your page is "page1.aspx" it might be something like:

    <some header information>
    ...
    if (isPostBack = true) then
    Response.Write("Please confirm the data and hit sumbit again (or some
    other message)");
    endif

    if (isPostBack = true) then
    response.write("<form method=post target=page2.aspx");
    else
    response.write("<form method=post target=page1.aspx");
    endif

    Then, when writing out your textboxes and other input forms, you can check
    to see if ispostback = true and it it is, you can populate the value
    appropriately from the request object.

    </form>

    Just a thought,
    Chris


    --------------------
    >From: (roger beniot)
    >Newsgroups: microsoft.public.dotnet.framework.aspnet
    >Subject: newbie navigation/form re-draw issue...
    >Date: 6 Apr 2004 12:12:53 -0700
    >Organization: http://groups.google.com
    >Lines: 18
    >Message-ID: <>
    >NNTP-Posting-Host: 12.129.11.151
    >Content-Type: text/plain; charset=ISO-8859-1
    >Content-Transfer-Encoding: 8bit
    >X-Trace: posting.google.com 1081278773 7573 127.0.0.1 (6 Apr 2004 19:12:53

    GMT)
    >X-Complaints-To:
    >NNTP-Posting-Date: Tue, 6 Apr 2004 19:12:53 +0000 (UTC)
    >Path:

    cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
    e.de!news.glorb.com!postnews1.google.com!not-for-mail
    >Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:224021
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >
    >I'm trying to figure out how to do something in ASP.NET that used to
    >be accomplished by doing a post from one page to another page.
    >
    >If a webform as fields for user information (address, name, phone,
    >etc) and a submit button... What is the best way in asp.net to
    >re-display the information and ask the user to verify the info is
    >correct.
    >
    >Will I do a post back to the same webform, remove the previous web
    >server controls and redraw the page w/ the new information?
    >
    >Would it be best to transfer to a new page (via Response.Redirect
    >(url) or Server.Transfer (url)) and get the information from the first
    >webform?
    >
    >
    >thanks,
    >roger
    >
    Chris Moore, Apr 10, 2004
    #2
    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. Alvin Bruney
    Replies:
    2
    Views:
    428
    Neil Kimber
    Jul 21, 2003
  2. Jeff
    Replies:
    0
    Views:
    695
  3. Replies:
    1
    Views:
    5,257
    Hywel Jenkins
    Oct 1, 2005
  4. =?Utf-8?B?TWlybw==?=

    Draw GraphicsPath performance issue

    =?Utf-8?B?TWlybw==?=, May 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    443
    =?Utf-8?B?TWlybw==?=
    May 15, 2006
  5. Laurahn
    Replies:
    3
    Views:
    905
    Steven Cheng[MSFT]
    Feb 6, 2007
Loading...

Share This Page