HTML Contents in GridView Rows Will Not Display as HTML?

Discussion in 'ASP .Net' started by Joey, Dec 22, 2005.

  1. Joey

    Joey Guest

    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!
     
    Joey, Dec 22, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Subba Rao via DotNetMonster.com

    script for moving rows up and down and traverse thru rows of HTML table

    Subba Rao via DotNetMonster.com, Mar 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    8,281
    Subba Rao via DotNetMonster.com
    Mar 19, 2005
  2. MC
    Replies:
    2
    Views:
    8,296
  3. zlf
    Replies:
    1
    Views:
    2,469
    Mick Wilson
    Apr 2, 2008
  4. VijayRama
    Replies:
    2
    Views:
    2,356
    Gregory A. Beamer
    Oct 12, 2009
  5. Replies:
    0
    Views:
    204
Loading...

Share This Page