Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Problems in Displaying Values in Text Box in ASP Page


Message #1 by ramk27@h... on Thu, 11 Oct 2001 13:22:25
Hi,



I am reading values from a Access 2000 database and displaying them in a 

text box in a ASP page. The values are not displayed in full. However the 

variable I am using displays them in full. For example the employee name 

is a "Richard Marx" but only "Richard" is displayed. If include a 

underscore instead of space then it displays in full as "Richard_Marx".



Can anyone comment on this.



Rgds

SK
Message #2 by "Jeffrey C. Lane" <jlane@t...> on Thu, 11 Oct 2001 08:32:06 -0400
When you display them back in the text box does the box have a large enough

size value to display the entire rield returned? A quick workaround ...use

and underscore or a hyphen and change the font color to to the color of

your background  so it can't be seen.



ie. <%=oRs("firstname")%><font color="white">-</font><%=oRs("lastname")%>













ramk27@h... on 10/11/2001 09:22:25 AM



Please respond to "Access ASP" <access_asp@p...>



To:   "Access ASP" <access_asp@p...>

cc:    (bcc: Jeffrey C. Lane/Telcordia)

Subject:  [access_asp] Problems in Displaying Values in Text Box in ASP

      Page







Hi,



I am reading values from a Access 2000 database and displaying them in a

text box in a ASP page. The values are not displayed in full. However the

variable I am using displays them in full. For example the employee name

is a "Richard Marx" but only "Richard" is displayed. If include a

underscore instead of space then it displays in full as "Richard_Marx".



Can anyone comment on this.



Rgds

SK
Message #3 by "Jose Bueno" <jbueno@i...> on Thu, 11 Oct 2001 20:25:27
Actually, you need to simply put quotes around the recordset field that 

you are sending to the textbox.



Paste this example into any asp page:

<%

Session("Name") = "Richard Marx"

%>



This will display the partial string<br>

<INPUT Type="text" name="txtProdAgent" value=<% =Session("Name")%>></INPUT>



<p>

This will display the full string<br>

<INPUT Type="text" name="txtProdAgent" value="<% =Session("Name")%

>"></INPUT>
Message #4 by "PUFFER, TIM" <TIM.PUFFER@T...> on Thu, 11 Oct 2001 15:48:32 -0500
here is some of the code on my search page, at least what I think applies.



  <TR VALIGN="top" ALIGN="left">

	<TD HEIGHT =30 width="463">

			<INPUT TYPE="text" NAME="Find" VALUE="" SIZE=28

MAXLENGTH=50 ></TD>

   </TR>

   <TR VALIGN="top" ALIGN="left">

	<TD HEIGHT =30 width="467"><SELECT NAME="in" size="1" >

		<OPTION VALUE="tydate">Date</OPTION>

		<OPTION VALUE="rptunit">Reporting Unit</OPTION>

		<OPTION VALUE="rptunitordrno">Reporting Unit Order

Number</OPTION>

		<OPTION VALUE="custnam">Customers Name</OPTION>

        <option value="enusrnam">End Users Name</option>

        <option value="equipdesc">Equipment Description</option>

        <option value="fiscwk">Fiscal Week</option>





-----Original Message-----

From: Jose Bueno [mailto:jbueno@i...]

Sent: Thursday, October 11, 2001 3:25 PM

To: Access ASP

Subject: [access_asp] Re: Problems in Displaying Values in Text Box in

ASP Page





Actually, you need to simply put quotes around the recordset field that 

you are sending to the textbox.



Paste this example into any asp page:

<%

Session("Name") = "Richard Marx"

%>



This will display the partial string<br>

<INPUT Type="text" name="txtProdAgent" value=<% =Session("Name")%>></INPUT>



<p>

This will display the full string<br>

<INPUT Type="text" name="txtProdAgent" value="<% =Session("Name")%

>"></INPUT>
Message #5 by ramk27@h... on Fri, 12 Oct 2001 01:55:40
Thank you Buddy, the solution of putting the quotes solved the problem. 

And thank you all others too for your response.



Thanx & Rgds

SK



> here is some of the code on my search page, at least what I think 

applies.

> 

>   <TR VALIGN="top" ALIGN="left">

> 	<TD HEIGHT =30 width="463">

> 			<INPUT TYPE="text" NAME="Find" VALUE="" SIZE=28

> MAXLENGTH=50 ></TD>

>    </TR>

>    <TR VALIGN="top" ALIGN="left">

> 	<TD HEIGHT =30 width="467"><SELECT NAME="in" size="1" >

> 		<OPTION VALUE="tydate">Date</OPTION>

> 		<OPTION VALUE="rptunit">Reporting Unit</OPTION>

> 		<OPTION VALUE="rptunitordrno">Reporting Unit Order

> Number</OPTION>

> 		<OPTION VALUE="custnam">Customers Name</OPTION>

>         <option value="enusrnam">End Users Name</option>

>         <option value="equipdesc">Equipment Description</option>

>         <option value="fiscwk">Fiscal Week</option>

> 

> 

> -----Original Message-----

> From: Jose Bueno [mailto:jbueno@i...]

> Sent: Thursday, October 11, 2001 3:25 PM

> To: Access ASP

> Subject: [access_asp] Re: Problems in Displaying Values in Text Box in

> ASP Page

> 

> 

> Actually, you need to simply put quotes around the recordset field that 

> you are sending to the textbox.

> 

> Paste this example into any asp page:

> <%

> Session("Name") = "Richard Marx"

> %>

> 

> This will display the partial string<br>

> <INPUT Type="text" name="txtProdAgent" value=<% =Session("Name")%

>></INPUT>

> 

> <p>

> This will display the full string<br>

> <INPUT Type="text" name="txtProdAgent" value="<% =Session("Name")%

> >"></INPUT>

  Return to Index