Code Behind and IF statement on whether to display content

I

igloogod

Ok, I have grown up on coding old ASP.
Now I am moving over to ASP.net and I need to understand...
I have a page where I am doing a post from an HTML page, to an aspx
page and doing the insert of the form to the database and redirecting
the user... that is all fine and good. Now I have a requirement to
test the state/zip against a table in my database before entering
their data in the db and redirecting the user. So in old ASP, I would
just put that code above the post... I can do that here too and do a
query against the database and then if it is valid state and zip I do
the insert and redirect, but if it is NOT a valid state/zip, I need to
display a form for them to put their state and zip in correctly, so I
need to add HTML to the aspx page... but I can't seem to write code in
the VB file and then do if statement in the aspx file to decide
whether or not to show the HTML.
Can anyone tell me how this is supposed to be done in ASP.Net?
Cause My brain is tooo stuck on old ASP.

thanks
 

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,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top