Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sku

Status
Not open for further replies.

thelearner

Programmer
Jan 10, 2004
153
US
Hi,

I'm trying to learn asp and come across this line.
if (request ("displaytype") = "sku")
What's "sku" means?
Thanks in advance
 
Back in my Inventory days a SKU was a STOCK KEEPING UNIT. In otherwords...one of your inventory items.
 
Are you sure the line of code isn't:

if (request.form("displaytype") = "sku")

(note the addtion of .form)???

If so, then I would assume you have a form variable called "displaytype", and one of the values can be "sku". Sounds like a "point of sale" or "inventory" application, as SKU typically stands for "Stock Keeping Unit".

TR
 
Do you need help with the .ASP or with the terms used by the initial programmer?
 
Hi,

never mind. I thougt it was some kind of ASP term.

Thanks.
 
Nope, just a string. Basically they are comparing the string "sku" to a passed value in the displayType variable.
Concerning TJRTechs addition, treating Request as a collection (ie, Request("someKey") is perfectly valid, just less efficient than specifying exactly which Request collection you want to use. When you jut use Request (without.Form, .QueryString.Cookies, etc) then the server searches all of the sub-collections for that key (Form, then Querystring, then cookies, then session...I think thats the order). By leaving it generic like that you could pass the data either as a Form POST or Form GET without having to do extra work to find out which one it is.

-T

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
The never-completed website:
 
Thanks Tarwn...wasn't aware of that behavior; but then again, I probably wouldn't use it nor recommended its use.

One shouldn't be coding 'extra' stuff, IMHO to check first form, then QS as the developer should be defining the contract for sending/receiving data and that contract should define if using forms, or qs, etc.

Being explicit will avoid potential errors down the road when you forget what you are already including in a form, or querystring, etc.

Just my 2 cents.

TR
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top