Best Practise

G

GW

Hello,

Been using Visual Studio 2005, SQL express 2005 and C# for last two weeks,
coming from 5 years of Dreamweaver, Classic ASP VBScript and MySQL.

Anyway, my first project involves a validated form with 15 fields.

I have the structure as follows:


Default.aspx
form.ascx
formCode.cs

I was wondering the best way to handle the submitted form after data is
saved in my database table. In classic ASP I would normally do a
response.redirect to the Thankyou.asp file with a message indicating the
enquiry has been received.

I was wondering if there is an easy way not to have to create an additional
ASPX file, and simply hide the form.ascx web control and show for example
thankyouResponse.ascx ? Another idea is to use a Label control, and simply
populate it with text after the data has been saved, but I would prefer to
load an ASCX file,as I have need to run quite a complex piece of SQL which
will determine the exact message to display.

Any general ideas appreciated. I must admit to being slightly overwhelmed
at the scope of how different .NET is to classic ASP. The object orientated
versus Inline coding is proving a lot to get my head around.

Cheers,

G.
 
G

Guest

Good question. You can try putting your form fields etc. inside a Panel, and
upon success, set its visibility propery to false. Same with any other
controls that you want to display / hide.
Peter
 

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

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top