In the ItemDataBound event of a datagrid, I am moving data from a varchar
cell into a textbox in a template cell as follows...
mytb.text = e.item.cells(i).text
my problem/question is that this move does not move all characters. For
instance carriage returns and line feeds don't get moved, and some other non
printable characters don't get moved.
Is there any documentation or rule as to what gets moved and what gets
ingored?
Thanks,
TOf course they don't. ASP:TextBox corresponds to <input type=text>.
That's a single line input, so naturally it only takes the first line
that you stick into it.
Try HtmlTextArea (<textarea runat=server> ) if you want multiline
input.
Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
Get your own Travel Blog, with itinerary maps and photos!
http://www.blogabond.com/
no, it just eliminates the characters and picks back up with following
characters. Effectively it "strips" them
T
"Jason Kester" <jasonkester@.gmail.com> wrote in message
news:1130019965.292118.103810@.g44g2000cwa.googlegroups.com...
> Of course they don't. ASP:TextBox corresponds to <input type=text>.
> That's a single line input, so naturally it only takes the first line
> that you stick into it.
> Try HtmlTextArea (<textarea runat=server> ) if you want multiline
> input.
> Jason Kester
> Expat Software Consulting Services
> http://www.expatsoftware.com/
> --
> Get your own Travel Blog, with itinerary maps and photos!
> http://www.blogabond.com/
>
Same effect as far as you're concerned. Be careful of the ASP:Whatever
tags that have a .Text property. They will invariably reformat your
strings to ensure that it gets HtmlEntityEncoded, and often lead to
wacky behavior like you're seeing.
Did switching to Textareas help?
Jason
well, back to my original question...
Is there any documentation or rule as to what gets moved and what gets
ingored?
T
"Jason Kester" <jasonkester@.gmail.com> wrote in message
news:1130022048.185101.202910@.g49g2000cwa.googlegroups.com...
> Same effect as far as you're concerned. Be careful of the ASP:Whatever
> tags that have a .Text property. They will invariably reformat your
> strings to ensure that it gets HtmlEntityEncoded, and often lead to
> wacky behavior like you're seeing.
> Did switching to Textareas help?
> Jason
>
It's not that something will be ignored. Incase, have some "<" / ">",
you'll get a "Potentially dangerous..." exception.
To avoid this, set the property "ValidateRequest = false" in @.Page
directive.
See documentation of "@.Page directive" for more details.
Cheers,
Gaurav Vaish
http://mastergaurav.org
--
0 comments:
Post a Comment