[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


I am putting together a website for Human Resources

Posted on 2005-04-20
Medium Priority
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
  • 2

Accepted Solution

NauticalNonsense earned 400 total points
ID: 13829043
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!

Expert Comment

ID: 13845142
Was this sufficient or do you need more help?

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Screencast - Getting to Know the Pipeline
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

834 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