From: Leo P. <Leo...@ga...> - 2003-11-18 08:26:40
|
Hi Raymond, right now i am going through your asp - ioelmsrv code and doing a re-write for our project just a remark on your comment in the function below: '* Get Request - returns a value from either the Request.QueryString or Request.Form Object * Function wsGetRequest(ByVal name) '# Get requested data sent by client via GET or POST '# Note: ASP Request Object returned a very strange object type. '# This is my only workaround Dim vl, mode mode=wsGetRequestMethod() If (mode="post") Then vl=("" & Request.Form(name)) If (Not IsValid(vl)) Then vl=("" & Request.QueryString(name)) wsGetRequest = vl End Function ANY Request returns a String (If present) or NULL (if not present) In our Team we'll ALWAYS use IF(LEN(TRIM(REQUEST(SOMETHING)) > 0 instead of the quirky '"" &' thing. --> the TRIM Converts the NULL Value to an EMPTY String, AND LEN returns 0 if no value was passed One Final Note: You don't have to distinguish between Request.Form and Request.Querystring - a simple Request("something") looks through all server collections(.form, .querystring, .servervariables) and returns the first found match. if you'd want me to send in the finished code, i'll be more than happy to. Leo |