April 2nd, 2003, 10:02 AM
HTML TextArea with ASP
I am trying to do a check to see if a value of one of my fields is a certain number. If it is I want to display a form text entry box, if not skip it. I want to put a value of another field in the text entry box so the user can edit/update the info. I have the code to display or not display, but when I try to display the value in the text entry field, I get quotes around it. My syntax is below.
Response.Write("<td> <textarea name=""cStatUnit1"" cols=""70"" rows=""10"">"""&rstblrinews.Fields.Item("cStatUnit1").Value&"""</textarea>")
If I take a " from each side of the variable, it does not work, like this it displays the date with " around the text. Can someone please help me figure how to get this displayed without quotes?
April 3rd, 2003, 01:20 PM
The problem is you have to many quotes going on. You have the value inside quotes so therefore it's going to display inside quotes.
Try this on for size.
Response.Write("<td> <textarea name=""cStatUnit1"" cols=""70"" rows=""10"">" & rstblrinews.Fields.Item("cStatUnit1").Value& "</textarea>")
April 14th, 2003, 11:00 PM
I prefer writing asp tags inside html code, instead of writing html codes using response.write. My code would be:
Oh! BTW, hello everyone. This is my first post to the forums. I am an absolute begginer in MySQL and ASP.
<td><textarea name='<%= cStatUnit1 %>' cols='70' rows='10'> <%= rstblrinews.Fields.Item("cStatUnit1").Value %></textarea>
Sweet smell of a great sorrow lies over the land. Plumes of smoke rise, merge into the leaden sky. A man lies and dreams of green fields and rivers, but awakes to a morning with no reason for waking. He's haunted by the memory of lost paradise. In his youth or dream, he can't be precise. He's chained forever to a world that's departed. It's not enough, it's not enough.