Populate data in text box
-
Hi all, Im having a bit of trouble displaying data from a field into a textbox. I should mention that this is a web application that is doing a select statement and then populating the data into a textbox. The problem is that one of the fields has spaces in it. If i try to display the data into a text box using this code: My Label Only the first word of the sentence is coming up. Is there a reason for this and a way around it? Any help would be greatly appreciated. Thanks
-
Hi all, Im having a bit of trouble displaying data from a field into a textbox. I should mention that this is a web application that is doing a select statement and then populating the data into a textbox. The problem is that one of the fields has spaces in it. If i try to display the data into a text box using this code: My Label Only the first word of the sentence is coming up. Is there a reason for this and a way around it? Any help would be greatly appreciated. Thanks
Hi there, The binding expression should be put in the quotes:
...
<input TYPE=text NAME=txtield_nameF SIZE=50 VALUE='<%=objRS("Field_name")%>'>
...However, If you don't place the textbox in any other list controls like DataList, Repeater ..., then assigning a value to the textbox right in the page does not look nice, try to add the
runat="server"
stuff to the textbox and set value in code-behind.