|
-
Mar 17th, 2002, 10:37 AM
#1
Thread Starter
Fanatic Member
executing a certain bit of code
Hi,
how can i execute a certain bit of code when the submit button is pressed? What i want to do is put the data in text boxes into a database record when the submit button is presses.....but i need to do it on the same page, instead of passing the variables to another.
Thanks for any help
Nick
-
Mar 17th, 2002, 09:25 PM
#2
Hi,
Personally i think its better if you use two pagesas you can then seperate the HTML and asp code. It becomes much more manageable.
You can do it using one page, but the code becomes hard to read and thus hard to debug when you have errors. Also you can let the web designer mess around with the laout(HTML) without interfearing with your asp code if u keep the page seperate.
To do it in the same page use parameter to decide if the user has submitted the form.
eg
if submitted=true then
'code to add to the database
else
'display the form
'and other html code
end if
Danial
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|