-
how do i find .where from the request is coming
hi,
i am sunil,working as a Software programmer. Well i do have a question
for u. Consider this scenario.
Step 1:
I have a asp page which queries the database using ADO 2.5 to retrieve the
data.
Example:-rs.open "select statement"
Step 2:
Suppose the request came from a pc then i wanna apply one style sheet(XSL)
or else if the request came from a mobile phone i should apply another style
sheet.That is done like this:
If Pc then
response.write PC.xsl
else if mobile phone then
response.write mobile.xsl
end if
Step 3:
Then i save my recordset to response object.
Example:-rs.save response,adpersistxml
This is fine .But in Step2 how do i find out where the request came from
so that i can apply different style sheets to my xml content.
-
Re: how do i find .where from the request is coming
This is not my field, but I had a look since the question is interesting.
I would GUESS that Request.ServerVariables("SERVER_PROTOCOL") would be different
if the request was coming from a mobile phone - possibly it would be WML/1.0
or something else. I hope this can get you in the right direction.
"Ghanta Sunil Krishna" <ghantasunil@usa.net> wrote:
>
>hi,
> i am sunil,working as a Software programmer. Well i do have a question
>for u. Consider this scenario.
>
>Step 1:
> I have a asp page which queries the database using ADO 2.5 to retrieve
the
>data.
>
> Example:-rs.open "select statement"
>
>Step 2:
> Suppose the request came from a pc then i wanna apply one style sheet(XSL)
>or else if the request came from a mobile phone i should apply another
style
>sheet.That is done like this:
>
> If Pc then
> response.write PC.xsl
> else if mobile phone then
> response.write mobile.xsl
> end if
>
>Step 3:
> Then i save my recordset to response object.
>
> Example:-rs.save response,adpersistxml
>
>
>This is fine .But in Step2 how do i find out where the request came from
>so that i can apply different style sheets to my xml content.
-
Re: how do i find .where from the request is coming
See also this link, that seems to relate to this subject - particularly the
ASP code at the end of the page:
http://allnetdevices.com/faq/?pair=04.006
"Ghanta Sunil Krishna" <ghantasunil@usa.net> wrote:
>
>hi,
> i am sunil,working as a Software programmer. Well i do have a question
>for u. Consider this scenario.
>
>Step 1:
> I have a asp page which queries the database using ADO 2.5 to retrieve
the
>data.
>
> Example:-rs.open "select statement"
>
>Step 2:
> Suppose the request came from a pc then i wanna apply one style sheet(XSL)
>or else if the request came from a mobile phone i should apply another
style
>sheet.That is done like this:
>
> If Pc then
> response.write PC.xsl
> else if mobile phone then
> response.write mobile.xsl
> end if
>
>Step 3:
> Then i save my recordset to response object.
>
> Example:-rs.save response,adpersistxml
>
>
>This is fine .But in Step2 how do i find out where the request came from
>so that i can apply different style sheets to my xml content.
-
Re: how do i find .where from the request is coming
Use the Request.ServerVariables collection to find information about the
requestor. For example, the combination of the
Request.ServerVariables("SERVER_SOFTWARE") or
Request.ServerVariables("HTTP_USER_AGENT") values probably contains what you
need.
"Ghanta Sunil Krishna" <ghantasunil@usa.net> wrote in message
news:3a41d1d4$1@news.devx.com...
>
> hi,
> i am sunil,working as a Software programmer. Well i do have a question
> for u. Consider this scenario.
>
> Step 1:
> I have a asp page which queries the database using ADO 2.5 to retrieve the
> data.
>
> Example:-rs.open "select statement"
>
> Step 2:
> Suppose the request came from a pc then i wanna apply one style sheet(XSL)
> or else if the request came from a mobile phone i should apply another
style
> sheet.That is done like this:
>
> If Pc then
> response.write PC.xsl
> else if mobile phone then
> response.write mobile.xsl
> end if
>
> Step 3:
> Then i save my recordset to response object.
>
> Example:-rs.save response,adpersistxml
>
>
> This is fine .But in Step2 how do i find out where the request came from
> so that i can apply different style sheets to my xml content.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|