Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

Displaying HTML Code in DataGrid....

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LamSoft - 11 Jul 2007 03:19 GMT
I have a cell in the datagrid, which the original data is as following:

Testing1
Testing2
Testing3
Testing4

There are 4 lines, while it displays on the browser, it shows as a line, and
I tried to replace "\r\n" to <br/>, but the smart ASP helps me to translate
<br/> into &quot;&lt;br/&gt; , so the <br/> is useless here.... How can I do
if the data is more than 1 line? Thanks.
Sergey Poberezovskiy - 11 Jul 2007 07:04 GMT
try to set HtmlEncode="false" on your column (and use <br/>)

> I have a cell in the datagrid, which the original data is as following:
>
[quoted text clipped - 7 lines]
> <br/> into "<br/> , so the <br/> is useless here.... How can I do
> if the data is more than 1 line? Thanks.
LamSoft - 11 Jul 2007 07:16 GMT
Thank you very much.
> try to set HtmlEncode="false" on your column (and use <br/>)
>
[quoted text clipped - 11 lines]
>> <br/> into "<br/> , so the <br/> is useless here.... How can I do
>> if the data is more than 1 line? Thanks.
LamSoft - 11 Jul 2007 07:38 GMT
Sorry, 1 more thing

How can I set HTMLEncode=false in the coding

GridView.Columns[1].HTMLEncode = false

but i cannot find any attributes about HTMLEncode under GridView.Columns

Thanks.

> try to set HtmlEncode="false" on your column (and use <br/>)
>
[quoted text clipped - 11 lines]
>> <br/> into "<br/> , so the <br/> is useless here.... How can I do
>> if the data is more than 1 line? Thanks.
Sergey Poberezovskiy - 11 Jul 2007 08:06 GMT
HtmlEncode is a BoundField property - so any column that inherits from will
support this attribute, but not the Columns collection

> Sorry, 1 more thing
>
[quoted text clipped - 21 lines]
> >> <br/> into "<br/> , so the <br/> is useless here.... How can I do
> >> if the data is more than 1 line? Thanks.
LamSoft - 11 Jul 2007 08:18 GMT
OH...
Thank you very much.
> HtmlEncode is a BoundField property - so any column that inherits from
> will
[quoted text clipped - 27 lines]
>> >> <br/> into "<br/> , so the <br/> is useless here.... How can I do
>> >> if the data is more than 1 line? Thanks.
Masudur - 11 Jul 2007 08:28 GMT
> I have a cell in the datagrid, which the original data is as following:
>
[quoted text clipped - 7 lines]
> <br/> into &quot;&lt;br/&gt; , so the <br/> is useless here.... How can I do
> if the data is more than 1 line? Thanks.

Hi

did  you tried replacing \r\n with environment.newline....?

Md. Masudur Rahman ( Munna )
Kaz Software Ltd.
http://www.kaz.com.bd
http://munnacs.110mb.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.