PC Review


Reply
Thread Tools Rate Thread

Case issue with ASP <%=Request("")%> code

 
 
Mike
Guest
Posts: n/a
 
      30th Jul 2004
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
 
Reply With Quote
 
 
 
 
Thomas A. Rowe
Guest
Posts: n/a
 
      30th Jul 2004
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" <(E-Mail Removed)> wrote in message
news:71ac01c47631$6642deb0$(E-Mail Removed)...
> 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



 
Reply With Quote
 
Mark Fitzpatrick
Guest
Posts: n/a
 
      30th Jul 2004
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" <(E-Mail Removed)> wrote in message
news:71ac01c47631$6642deb0$(E-Mail Removed)...
> 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



 
Reply With Quote
 
MD Websunlimited
Guest
Posts: n/a
 
      30th Jul 2004
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" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:71ac01c47631$6642deb0$(E-Mail Removed)...
> > 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

>
>



 
Reply With Quote
 
Richard Weerts
Guest
Posts: n/a
 
      30th Jul 2004

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" <(E-Mail Removed)> wrote in message
news:71ac01c47631$6642deb0$(E-Mail Removed)...
> 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



 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      30th Jul 2004
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" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:71ac01c47631$6642deb0$(E-Mail Removed)...
> > > 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

> >
> >

>
>



 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      30th Jul 2004
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" <(E-Mail Removed)> wrote in

message
>news:71ac01c47631$6642deb0$(E-Mail Removed)...
>> 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

>
>
>.
>

 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      30th Jul 2004
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" <(E-Mail Removed)> wrote in message
news:759b01c47657$ef929590$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in

> message
> >news:71ac01c47631$6642deb0$(E-Mail Removed)...
> >> 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

> >
> >
> >.
> >



 
Reply With Quote
 
Richard Weerts
Guest
Posts: n/a
 
      30th Jul 2004
Can we look at the form page and post page?

Richard



"Mike" <(E-Mail Removed)> wrote in message
news:759b01c47657$ef929590$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in

> message
> >news:71ac01c47631$6642deb0$(E-Mail Removed)...
> >> 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

> >
> >
> >.
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Field Names: "LongName", "ShortName", "Code", "Description","Comments" PeteCresswell Microsoft Access 2 25th Feb 2009 11:41 PM
how do I count only lower case "x" and exclude upper case "X" =?Utf-8?B?amJlbGV0eg==?= Microsoft Excel Worksheet Functions 3 14th Oct 2006 10:50 PM
Error "Http exception was unhandled by user code. Request Not Availablein this context" Blasting Cap Microsoft ASP .NET 0 17th May 2006 01:40 PM
Fix Code: Select Case and "Contains" selection =?Utf-8?B?QmV0dGVyZ2FpbnM=?= Microsoft Excel Programming 5 26th Apr 2005 02:22 AM
"New Meeting Request to Contact" issue.. Neil Dittmar Microsoft Outlook Form Programming 1 11th Jun 2004 02:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:29 AM.