Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 Q on ASP form page design

Author  Topic 

SamC
White Water Yakist

3467 Posts

Posted - 2004-07-26 : 10:09:36
I've been in the habit of coding multiple page forms that post to different asp pages.

Is there a way to have different forms post to the same page yet determine which form issued the post?

Sam

JasonGoff
Posting Yak Master

158 Posts

Posted - 2004-07-26 : 10:11:32
How about a hidden field on the form that passes an ID to the page - you can then use this to identify which form was posted.
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2004-07-26 : 10:15:50
OK. So dere's no Request.Form("Formname")... Hidden field'l do.

Here's another subject I've read a lot about, and have my doubts... Connections... I've got connections...

I create a command object for every query on the page and destroy the object. I've read others create an object at the top of the page, use it for every query in the page, then destroy the object at the end of the page.

IYHO, is it worth the performance gain for me to rewrite ?

Sam
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-07-26 : 10:27:44
for the command, i think it makes no difference. Whichever is easiest for you. it also depends on how you are handling parameters. if you are appending them at the end of your commandtext like "exec spname '" & param & "'", then it is no big deal, but if you are using the parameters collection then you should probably explicitly create new commands for each DB call to ensure you dont' have weird results with your parameters.

And of course, the main thing is to make sure you keep using the same connection object, and make sure you explicitly close the connection at the end of the page.

- Jeff
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2004-07-26 : 10:35:39
Lemme take another look and come back later.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-07-26 : 12:02:53
yup - connection is the one that is can be "expensive" to get

Kristen
Go to Top of Page
   

- Advertisement -