Working on some mods for a legacy app that involves "classic" ASP 3.0. Now I really apprecate .NET's infrastructure.
Anyhow, while I was coding I started to wonder if other people code submit buttons differently. Whenever I have a page with multiple submit buttons, I name them differently and then do a
if request.form("submitbtn") <> "" then
line of code to tell which button was pressed. I got to thinking that maybe it would be easier if I named all the buttons the same and then just made the values different and queried the request.form("genericbuttonname") on what its value was. (kinda like when you have a check box column)
Do you guys do it like that or the way I do it? Is one method better than another or does it just come down to preference?
Anyhow, while I was coding I started to wonder if other people code submit buttons differently. Whenever I have a page with multiple submit buttons, I name them differently and then do a
if request.form("submitbtn") <> "" then
line of code to tell which button was pressed. I got to thinking that maybe it would be easier if I named all the buttons the same and then just made the values different and queried the request.form("genericbuttonname") on what its value was. (kinda like when you have a check box column)
Do you guys do it like that or the way I do it? Is one method better than another or does it just come down to preference?