| Author |
Topic Search Topic Options
|
MorningZ
Senior Member
Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
|
Posted: 03 June 2003 at 9:26am |
your question was answered a few times already
people specify (and should) "where" the value comes where they expect it from: URL line, Posted form field, cookie, servervariables
instead of (poorly) coding something that potentially will give your application the dead wrong value......
it's all a matter of programming style.. you can use Request if you want, but you'll make debugging your problems that much harder and good luck to someone trying to pick up on the code trail
i have zero idea why that seems so complicated to you.....
|
|
Contribute to the working anarchy we fondly call the Internet
|
 |
Gary
Senior Member
Joined: 20 March 2002
Location: United Kingdom
Status: Offline
Points: 326
|
Posted: 03 June 2003 at 9:36am |
Not complicated at all - its just that the answers did not tell me anything that I didn't already know.
Sure, I could just use 'request' on it's own from now on, but as I start doing more and more complex things with asp it could come back to haunt me.
Please show me anywhere in the answers anything that relates to the likes of Cookies, ClientCertificates, ServerVariables, performance, etc and I will eat 'humble pie'.
Yes, if I had asked what the difference between POST & GET / FORM & QUERYSTRING, then the above answers would be more than sufficient.
|
 |
ljamal
Mod Builder Group
Joined: 16 April 2003
Status: Offline
Points: 888
|
Posted: 03 June 2003 at 9:45am |
|
I only use Request over Request.Form or Request.Querystring, if I expect the information to come from either the Form or the querystring. Otherwise, I will use the specific over the general. I first started using the specific because I had field called URL and when left blank in the querystring or the form, it pulls the value from the servervariables.
Ther may be a performance hit to using request, but it does search querystring and then form, so if you are sure that the value is in one or the other, it's not a big performance hit.
|
|
|
 |
Gary
Senior Member
Joined: 20 March 2002
Location: United Kingdom
Status: Offline
Points: 326
|
Posted: 03 June 2003 at 9:51am |
Thanks ljamal - some proof that things can go wrong with 'Request' if you're not careful (re: requesting url).
And that is exactly my point !!!
Maybe if you're the only person working on a small-reasonable sized site, 'Request' will suffice. But in my case, where I work for one of the world's largest software companies developing massive sites/apps that manage the likes of our global distribution, then this 'exetended' knowledge is of great benefit.
|
 |
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Posted: 03 June 2003 at 10:47am |
Gary wrote:
Ok, so both will do the same thing, but why not always just use Request on its own rather than specifying form or querystring ???
|
and we're all ment to know EXACTLY wot you mean? 
|
 |
Gary
Senior Member
Joined: 20 March 2002
Location: United Kingdom
Status: Offline
Points: 326
|
Posted: 03 June 2003 at 1:27pm |
Not at all Scotty - you're not all supposed to know exactly what I mean.....
This was obviously quite an advanced question that was not answered completely (within this forum). Don't get me wrong, I am not belittling or offending anyone. I merely responded to the suggesting answers, saying that they were not what I was after.
So what do you do when you ask a question and the answers that are submitted do not meet you needs? Simple, you ask again and try rephrasing the question. At least I have not started multiple threads for the same question (unlike some on this board).
|
 |
ultramods
Groupie
Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
|
Posted: 03 June 2003 at 1:38pm |
Gary wrote:
WHY NOT JUST USE REQUEST INSTEAD OF REQUEST.FORM OR REQUEST.QUERYSTRING ????
There must be some reason for this? Please, please, please - no second guessing. If you do not understand the question then do not reply.
|
The way in which you rephrased your question may have put people of helping you in the future, in case they are not 100% certain that their answer it is correct. You may not mind that. But what if his or her answer is correct, and no one else posts an answer?
|
 |
Gary
Senior Member
Joined: 20 March 2002
Location: United Kingdom
Status: Offline
Points: 326
|
Posted: 03 June 2003 at 2:28pm |
Valid point Ultramods - I thought exactly that as the thread continued.
Having said that, there was no need for some of the comments (or rather abuse) posted further up the thread.
The problem is that the board covers all abilities from beginner right through advanced coders and sometimes it can be difficult to gauge just how deep some people (me included) want to go.
Although when you quoted one of my posts, you didn't include my 'apology' at the end. I have never been offensive on here and do not intend to be. Yet I could have easilt been drawn into a slanging match!!!
|
 |