HTML Contents in GridView Rows Will Not Display as HTML?

J

Joey

Hello all,

I am trying to read a directory listing into a string[] and then use
that data, along with some other data, to create HTML for display in a
gridview row. A sample item in the string[] might look like this...

<div style='vertical-align:middle;'><img src='image.jpb'><a
href='somefile.zip'>somefile.zip</a></div>

I then bind the array to a gridview to show on the form.

This always worked great with a datagrid in VS2003. Now, however, the
gridview handles the HTML differently: if reformats it? What I mean is,
the HTML displays as literal text...the gridview rows really show the
HTML tags (<div>, etc...). When inspecting the page with the browser's
View | Source, I can see that the page has all of the <div> as &lt div
&gt. Why is this happening, and how do I fix it? It would be great if
asp.net would not change my code!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top