Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > 'request' help

Reply
Thread Tools

'request' help

 
 
polilop
Guest
Posts: n/a
 
      10-26-2005
I have a form which shows all Records from a database
eg.
select * from sometable

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
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???


 
Reply With Quote
 
 
 
 
Bob Lehmann
Guest
Posts: n/a
 
      10-26-2005
> Is there a way to see this without checking every form field???

Yes, simply apply the same methodology you use to see if there's any beer in
your refrigerator without opening the door.

Bob Lehmann

"polilop" <> wrote in message
news:...
> I have a form which shows all Records from a database
> eg.
> select * from sometable
>
> 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
> 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???
>
>



 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      10-26-2005
Bob Lehmann wrote on 26 okt 2005 in
microsoft.public.inetserver.asp.general:

>> Is there a way to see this without checking every form field???

>
> Yes, simply apply the same methodology you use to see if there's any
> beer in your refrigerator without opening the door.
>


Look to see if there is a note on the door saying:
"We're out of beer, your're out of luck, be out of here"?

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

 
Reply With Quote
 
MyndPhlyp
Guest
Posts: n/a
 
      10-26-2005

"Evertjan." <> wrote in message
news:Xns96FB68A63FEA9eejj99@194.109.133.242...
> Bob Lehmann wrote on 26 okt 2005 in
> microsoft.public.inetserver.asp.general:
>
> >> Is there a way to see this without checking every form field???

> >
> > Yes, simply apply the same methodology you use to see if there's any
> > beer in your refrigerator without opening the door.
> >

>
> Look to see if there is a note on the door saying:
> "We're out of beer, your're out of luck, be out of here"?


No, no, no. That requires effort. It is so much easier to yell from the
comfort of the reclining chair, "Honey, get me a beer."


 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      10-26-2005
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"


 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      10-26-2005
Evertjan. wrote:
> Bob Lehmann wrote on 26 okt 2005 in
> microsoft.public.inetserver.asp.general:
>
>>> Is there a way to see this without checking every form field???

>>
>> Yes, simply apply the same methodology you use to see if there's any
>> beer in your refrigerator without opening the door.
>>

>
> Look to see if there is a note on the door saying:
> "We're out of beer, your're out of luck, be out of here"?


Funny, but this is pretty much what i suggested when I suggested that he use
a hidden form field.
--
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"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Help Help Pentax S5i Help needed (Please) The Martian Digital Photography 14 06-20-2008 07:56 AM
HELP - HELP - HELP =?Utf-8?B?S2ltb24gSWZhbnRpZGlz?= ASP .Net 4 03-09-2006 12:46 PM
HELP WANTED HELP WANTED HELP WANTED Harvey ASP .Net 1 07-16-2004 01:12 PM
HELP WANTED HELP WANTED HELP WANTED Harvey ASP .Net 0 07-16-2004 10:00 AM
HELP! HELP! HELP! Opening Web Application Project Error =?Utf-8?B?dHJlbGxvdzQyMg==?= ASP .Net 0 02-20-2004 05:16 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57