How To : "Thank You" message

  • Thread starter Thread starter Rob Meade
  • Start date Start date
R

Rob Meade

Hi all,

Ok - probably really obvious and something I'm clearly missing...but ...

I have a form with 3 areas for text to be entered, the form has some
validation controls, upon it being successfully completed, and submitted to
the server, the text is fired off to a stored procedure on our SQL Server -
I then want the WebForm to change (ie the text areas are gone) and a thank
you message to appear.

In old ASP - I'd have done this by using a hidden input tag, checking for
"submitted" or not etc, and then display the relevant HTML accordingly...

Any advice for doing this in ASP.Net (VB)...

Thanks for any help,

Regards

Rob
 
Panels. Put the information into a panel. Wireup a click event to the
button. When the button is pressed and the information is successfully
validated and stored, you hide the panel that contains the form and you show
the panel that has the thank you (by changing the enabled and visible
properties).

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
...
Panels. Put the information into a panel. Wireup a click event to the
button. When the button is pressed and the information is successfully
validated and stored, you hide the panel that contains the form and you show
the panel that has the thank you (by changing the enabled and visible
properties).

Hi Mark

Many thanks for your reply.

Because I'm 'new' to this I'm looking for the 'normal way' etc - is this
that? Having just spoken to a colleague here he suggested that using ASP
inline (with the HTML etc) and testing for the IsPostBack might achieve the
same thing (obviously I'll be then needing to duplicate some HTML also)...

Any further info appreciated.

I'm go see what I can find out about 'panels' - I've not heard of them
before etc..

Regards

Rob
 
...
Panels. Put the information into a panel. Wireup a click event to the
button. When the button is pressed and the information is successfully
validated and stored, you hide the panel that contains the form and you show
the panel that has the thank you (by changing the enabled and visible
properties).

Thanks again Mark - I've just tried it and it works PERFECTLY - I know have
exactly what I wanted...

Minor issue that when I typed in the code for the panel etc Visual Studio
kindly uppercased all of my HTML tags within the panel tags...the bugger! :)

Regards

Rob
 
Back
Top