This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Front Page > July 2004 > Case issue with ASP <%=Request("")%> code
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Case issue with ASP <%=Request("")%> code
|
|
|
| I have an ASP page that lists projects by type. The code
at the top of the page lists which type of project it is
using <%=Request("projType")%> item.
Strange thing is that when the page displays, the project
type is in lower case "housing". The projType list in the
database is in sentence case as in "Housing", but on the
page it comes up in lower case. I need it to display in
Sentence case.
What could be causing this?
-M
| |
| Thomas A. Rowe 2004-07-30, 12:15 pm |
| If the data was place in the database directly via Access Forms and then Access Forms is use to
display it, then Access is controlling this. On the web with ASP/VBScript, you are seeing the
content as it is actually stored in the database.
Maybe someone known a script that does Sentence case, but in general I VBScript support lowercase
and uppercase directly and I have code the allow Proper case, but I have never seen code for
Sentence case, so this would be something you would have to write or find someone to write OR place
the content into the database directly in the format you want it to be displayed.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
"Mike" <anonymous@discussions.microsoft.com> wrote in message
news:71ac01c47631$6642deb0$a601280a@phx.gbl...
> I have an ASP page that lists projects by type. The code
> at the top of the page lists which type of project it is
> using <%=Request("projType")%> item.
>
> Strange thing is that when the page displays, the project
> type is in lower case "housing". The projType list in the
> database is in sentence case as in "Housing", but on the
> page it comes up in lower case. I need it to display in
> Sentence case.
>
> What could be causing this?
>
> -M
| |
| Mark Fitzpatrick 2004-07-30, 12:15 pm |
| You might also try accessing the correction more directly. Just saying
Request("fieldname") is an expensive operation actually because it has to go
through all the collections, Form, QueryString, and ServerVariables. The
ServerVariables collection is extremely slow as it has to ask the server for
all these variables. See if doing Request.QueryString("fieldname") (if using
the Get method) or Request.Form("fieldname") (if using the POST method) may
make a difference. It may just be that searching through all the collections
for a matching key is messing it up. You may also try posting in the
microsoft.public.inetserver.asp.general newsgroup as well.
Hope this helps
Mark Fitzpatrick
Microsoft MVP - FrontPage
"Mike" <anonymous@discussions.microsoft.com> wrote in message
news:71ac01c47631$6642deb0$a601280a@phx.gbl...
> I have an ASP page that lists projects by type. The code
> at the top of the page lists which type of project it is
> using <%=Request("projType")%> item.
>
> Strange thing is that when the page displays, the project
> type is in lower case "housing". The projType list in the
> database is in sentence case as in "Housing", but on the
> page it comes up in lower case. I need it to display in
> Sentence case.
>
> What could be causing this?
>
> -M
| |
| MD Websunlimited 2004-07-30, 7:15 pm |
| Hi Thomas,
No special script is required use StrConv(string expression, vbProperCase)
--
Mike -- FrontPage MVP '97-'02
http://www.websunlimited.com
FrontPage Add-ins Since '97 FP 2003 / 2002 / 2000 Compatible
"Thomas A. Rowe" <tarowe@mvps.org> wrote in message news:OqBRb0jdEHA.996@TK2MSFTNGP12.phx.gbl...
> If the data was place in the database directly via Access Forms and then Access Forms is use to
> display it, then Access is controlling this. On the web with ASP/VBScript, you are seeing the
> content as it is actually stored in the database.
>
> Maybe someone known a script that does Sentence case, but in general I VBScript support lowercase
> and uppercase directly and I have code the allow Proper case, but I have never seen code for
> Sentence case, so this would be something you would have to write or find someone to write OR place
> the content into the database directly in the format you want it to be displayed.
>
> --
> ==============================================
> Thomas A. Rowe (Microsoft MVP - FrontPage)
> WEBMASTER Resources(tm)
> http://www.ycoln-resources.com
> FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> ==============================================
> To assist you in getting the best answers for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
>
> "Mike" <anonymous@discussions.microsoft.com> wrote in message
> news:71ac01c47631$6642deb0$a601280a@phx.gbl...
>
>
| |
| Richard Weerts 2004-07-30, 7:15 pm |
|
I can't see all of the code for your page, but I suspect that you have a
drop-down selector on the previous page with <select name="projTyp"> ... ??
If that is true, then I suspect that the reason you are seeing "housing"
instead of the DB version "Housing" is because "housing" is the value
assigned to that option in the drop-down code.
<option value="housing">Housing</option>
Would LOOK like you are selecting "Housing" but the value sent to the post
processing page is "housing".
Either change the <option ... > code or present the DB version rs("Field")
instead of Request("projType") on the results page.
Again, I made some assumptions here but hope this helps.
Richard Weerts
"Mike" <anonymous@discussions.microsoft.com> wrote in message
news:71ac01c47631$6642deb0$a601280a@phx.gbl...
> I have an ASP page that lists projects by type. The code
> at the top of the page lists which type of project it is
> using <%=Request("projType")%> item.
>
> Strange thing is that when the page displays, the project
> type is in lower case "housing". The projType list in the
> database is in sentence case as in "Housing", but on the
> page it comes up in lower case. I need it to display in
> Sentence case.
>
> What could be causing this?
>
> -M
| |
| Thomas A. Rowe 2004-07-30, 7:15 pm |
| Mike,
Thanks for that, I have always used a script to accomplish this. The MS VBScript Language Reference
doesn't contain any references for displaying text in ProperCase format.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
"MD Websunlimited" <none@none.com> wrote in message news:un57zkkdEHA.3016@tk2msftngp13.phx.gbl...
> Hi Thomas,
>
> No special script is required use StrConv(string expression, vbProperCase)
>
>
> --
> Mike -- FrontPage MVP '97-'02
> http://www.websunlimited.com
> FrontPage Add-ins Since '97 FP 2003 / 2002 / 2000 Compatible
>
> "Thomas A. Rowe" <tarowe@mvps.org> wrote in message news:OqBRb0jdEHA.996@TK2MSFTNGP12.phx.gbl...
lowercase[color=darkred]
place[color=darkred]
>
>
| |
|
| The drop down is from the database. The database table
contains the word Housing. I would suspect then that it
should return "Housing", not housing.
-M
>-----Original Message-----
>
>I can't see all of the code for your page, but I suspect
that you have a
>drop-down selector on the previous page with <select
name="projTyp"> ... ??
>
>If that is true, then I suspect that the reason you are
seeing "housing"
>instead of the DB version "Housing" is because "housing"
is the value
>assigned to that option in the drop-down code.
>
><option value="housing">Housing</option>
>
>Would LOOK like you are selecting "Housing" but the
value sent to the post
>processing page is "housing".
>
>Either change the <option ... > code or present the DB
version rs("Field")
>instead of Request("projType") on the results page.
>
>Again, I made some assumptions here but hope this helps.
>
>Richard Weerts
>
>
>
>"Mike" <anonymous@discussions.microsoft.com> wrote in
message
>news:71ac01c47631$6642deb0$a601280a@phx.gbl...
code[color=darkred]
is[color=darkred]
project[color=darkred]
the[color=darkred]
the[color=darkred]
>
>
>.
>
| |
| Thomas A. Rowe 2004-07-30, 7:15 pm |
| Are you viewing the data in Access in table view?
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
"Mike" <anonymous@discussions.microsoft.com> wrote in message
news:759b01c47657$ef929590$a301280a@phx.gbl...[color=darkred]
> The drop down is from the database. The database table
> contains the word Housing. I would suspect then that it
> should return "Housing", not housing.
>
> -M
> that you have a
> name="projTyp"> ... ??
> seeing "housing"
> is the value
> value sent to the post
> version rs("Field")
> message
> code
> is
> project
> the
> the
| |
| Richard Weerts 2004-07-30, 7:15 pm |
| Can we look at the form page and post page?
Richard
"Mike" <anonymous@discussions.microsoft.com> wrote in message
news:759b01c47657$ef929590$a301280a@phx.gbl...[color=darkred]
> The drop down is from the database. The database table
> contains the word Housing. I would suspect then that it
> should return "Housing", not housing.
>
> -M
> that you have a
> name="projTyp"> ... ??
> seeing "housing"
> is the value
> value sent to the post
> version rs("Field")
> message
> code
> is
> project
> the
> the
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|