[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 151
  • Last Modified:

Assigning Text to a Text box

Hi, I am trying to assign a string to a text box using the following statement:

<INPUT id=txtMCat name=txtMCat style="HEIGHT: 22px; WIDTH: 258px" value=<%= Server.HTMLEncode(myVal)%> >

This works, sort off, the problem is that if the string consists of more than one word only the first word is displayed in the textbox.

Anybody can tell me what I'm doing wrong.
I'm quite new to HTML and dont have a lot of time to try and figure it out on my own (Demo monday).

Thnx
0
Veroland
Asked:
Veroland
  • 3
  • 3
  • 2
1 Solution
 
jamestthomasCommented:
Not sure why you are htmlencoding it, try it without.
0
 
VerolandAuthor Commented:
It's not the HTMLencode thats giving the problems, it does it even if I take the HTMLEncode out
0
 
KennyIT Application ExecutiveCommented:
put quote marks (") around it.

Should work for more than 1 word with it.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
VerolandAuthor Commented:
I've tried that, it didn't work
0
 
KennyIT Application ExecutiveCommented:
You put the " outside the angled brackets?
0
 
KennyIT Application ExecutiveCommented:
I mean as in :

value="<%= Server.HTMLEncode(myVal)%>" > 
0
 
VerolandAuthor Commented:
Thank you very much
0
 
jamestthomasCommented:
That was my first thought DARN IT.  I always do that with text firleds.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now