polilop wrote:
I have a form which shows all Records from a database
eg.
select * from sometable
You should avoid doing this:
http://www.aspfaq.com/show.asp?id=2096
the user inputs criteria in a form on the sam page and submits it.
i need to see if the form has been submited. and the way to do it is
to see if i have 'Request.form(somefield)' and then refrase the sql
into something like
select *from table where something=this and somethingelse=this
Doesn't your table have a primary key??
my problem is that i have to check every form field to see if it has
been set(not empty).
Is there a way to see this without checking every form field???
Sure. Use some client-side code in the form's onsubmit event to populate a
hidden field to indicate whether or not the form's data has been changed.
That will allow you to only check a single field in your server-side code to
see if you need to process the form's data. Of course, you will also need to
fall back to checking all the fields in the event that the client has
client-side scripting disabled.
If you need help writing the client-side code, post to a client-side
scripting newsgroup such as microsoft.public.scripting.jscript.
HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"