Submit Button

W

WendyWest

I am actually using Visual Studio but I can't find a discussion group for it.
I have a submit button that saves data to a database but I also want it to
open a "Thank You" page. My code is:

Try
InsertDataIntoDB()
Catch ex As Exception
Throw New Exception("", ex)
End Try

How can I get this to also open a .htm page?
 
B

Bob Lehmann

Look up Response.Redirect or Server.Transfer, depending on your needs.

The Dotnet groups all start with microsoft.public.dotnet. I think that
microsoft.public.dotnet.aspnet would probably be your best bet.

Bob Lehmann
 
W

WendyWest

Thank you! That worked perfectly. :)

Bob Lehmann said:
Look up Response.Redirect or Server.Transfer, depending on your needs.

The Dotnet groups all start with microsoft.public.dotnet. I think that
microsoft.public.dotnet.aspnet would probably be your best bet.

Bob Lehmann
 
B

Bob

Confirmation Page?

Using FrontPage...Maybe this will help some?

After site visitors fill out a form and submit it, they can be directed to a
confirmation page where they can confirm that they completed the form
information correctly.

As you create the confirmation page, determine which form field data you
want to display to your site visitors. If there is any field data that you
want to conceal from your site visitors, do not create a confirmation field
on the confirmation page for that form field data.

The process involves composing a message to site visitors, selecting fields
you want to show and those you don't, and then assigning your confirmation
page to your form or to the database where you collect form results.

On the File menu, click New.
In the New task pane under New page, click Blank page.
Name and save the Web page.

On the File menu, click Save As.
In the Save in box, locate the folder in which you want the confirmation
page file to reside.
In the File name box, type the name of the file, and then click Save.
On your new page, type the text you want to display to a site visitor who
has submitted the form.
For example, "Thank you for your response. Please confirm your e-mail
address."

On the page that contains your form, identify the form field data that you
want your site visitors to confirm. For example, you could display the
contents of an e-mail address field, allowing the site visitor to confirm
that he or she typed it correctly. You will need to use the unique form
field names for each data field you want to send to the confirmation page.
From your confirmation page, type the name of the field from which you want
to display information.
How?

On your confirmation page, from the Insert menu, click Web Component.
In the Component type pane, click Advanced Controls, and in the Choose a
control pane, double-click Confirmation Field.
Type the name of the field from which you want to display information, and
then click OK.
Note The name of this field must match the name you gave the form field
when you set its properties.

The name of the field is displayed in brackets [ ] on the form. When the
confirmation form is displayed to the site visitor, this field will display
the site visitor's entry instead.

Repeat the above steps for each field you want to display for confirmation.
Assign the confirmation page to your form.

Right-click the form, and then click Form Properties.
Click Options, and then click the Confirmation Page tab.
In the URL of confirmation page box, type the file name and location of the
confirmation page you just created, or click Browse to locate it.
Notes:
If you are saving your form results to a database, you must save your
confirmation page with an .asp extension.
To test the functionality of your form, you must first publish your Web site
to a Web server. After the Web site is published, click Preview in Browser
to test the form.


bob
|I am actually using Visual Studio but I can't find a discussion group for
it.
| I have a submit button that saves data to a database but I also want it to
| open a "Thank You" page. My code is:
|
| Try
| InsertDataIntoDB()
| Catch ex As Exception
| Throw New Exception("", ex)
| End Try
|
| How can I get this to also open a .htm page?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top