Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 19th, 2003, 01:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default response.write problem

I am problem in rs("sect_area") line.
rs("sect_Area") not display full name.
I am want to edit the record.

sect_area=Request.Form("sect_area")

ssql="select sect_area from sectors"

set rs=cn.execute(ssql)

if rs.eof=false then

Response.Write("<tr>")
Response.Write("<td bgcolor=99ccff><b>Sector Area</b></td>")
Response.Write("<td><input type=text name=sect_area value=" & rs("sect_area") & "></td>") //not display full name
Response.Write("</tr>")


rs("sect_Area") only display half record ie. Abu or Air or Denfece. Why rs("sect_area") not display full name ? ie.
Abu Dhabi or Air port city or Defence office city

sect_area field like this
----------------------------------------
Abu Dhabi
Air port city
Defence office city
…….


Mateen
 
Old August 19th, 2003, 03:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

When you have spaces in the value text it assumes the space is the end of the value attribute. To make it display the whole text, includiong the space, you need to enclose the value in quotes (this is good practice anyway).
Code:
Response.Write("<td><input type='text' name='sect_area' value='" & rs("sect_area") & "'></td>")
 
Old August 19th, 2003, 04:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks a lot.


Quote:
quote:Originally posted by pgtips
 When you have spaces in the value text it assumes the space is the end of the value attribute. To make it display the whole text, includiong the space, you need to enclose the value in quotes (this is good practice anyway).
Code:
Response.Write("<td><input type='text' name='sect_area' value='" & rs("sect_area") & "'></td>")





Similar Threads
Thread Thread Starter Forum Replies Last Post
response.write crmpicco Classic ASP Basics 1 January 27th, 2005 06:31 PM
response.write spacing marketingmaggie Classic ASP Databases 2 October 16th, 2004 12:59 PM
response.write netcrawler Classic ASP Databases 4 September 29th, 2004 10:13 AM
Response.write Sach Classic ASP Components 5 March 19th, 2004 06:40 AM
Response.Write an SSI hcweb Classic ASP Basics 2 November 2nd, 2003 05:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.