I am putting together a website for Human Resources

Posted on 2005-04-20
Last Modified: 2010-04-07
I am putting together a website for Human Resources to track employees, and days taken off etc.  

I have the website functioning as far as imputting the employee....that was pretty easy.  All the information is being written to the dbase fine but I want to put in a confirmation page.  How do I get the site to redirect to confirmation page upon submit so that it displays all the information that has been put in?  I know how to write it if the information is correct with the button click and I know how to go back if it isn't...  I just need to know how to display the information on a confirmations page before submission.

Pretty easy huh...well I am new.
Question by:mgcarney
    LVL 7

    Accepted Solution

    Assume your page is called Form.aspx.

    On your page load, do something like this

    If IsPostBack Then
       If Page.IsValid Then 'If your page passes the validation for the form
          AddUser() ' This is your add user function
           ' do whatever
        End If
     ' do whatever
    End If

    Then, on your confirmation page, since you did a server.transfer, you can do this one of two ways ... you can still access the controls with server.transfer, OR if you've already added it to the database, get the ID out for that record, and pass it to Confirm.aspx?id=x , and address the user that way.

    If you don't want them added to the DB on this page, then put the AddUser() in Confirm.aspx.

    You can also keep everything on the same page by separating your Form, Confirmation, and Thank You page by creative use of the ASP:Panel control. This one rocks, and keeps everything on the same page. The panels work like so:

    <asp:Panel id=pnlForm runat="server" Visible=True>
       -- show your form

    <asp:Panel id="pnlConfirmation" runat="server" Visible=False>
      -- show your confirm

    You can programmatically control the panels visibility by using pnlForm.Visible = True / False.

    There's a lot of ways to skin this cat, these are just a couple.

    Good Luck!
    LVL 7

    Expert Comment

    Was this sufficient or do you need more help?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
    A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now