adding image to table cell

Discussion in 'ASP .Net' started by Guest, Oct 28, 2004.

  1. Guest

    Guest Guest

    i am trying to add image to table cell. Here is my code..

    System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image();
    for(int i=0; i < allRecords.Length; i++)
    TableRow tRow = new TableRow();
    TableCell tCell1= new TableCell();

    The image doesnot appear when the page is run. Is there anything wrong.

    Guest, Oct 28, 2004
    1. Advertisements

  2. The code looks good. What is the HTML emitted?

    Also, why are you manually creating a table like this? Might a
    DataGrid, DataList, or Repeater be a better option?


    Scott Mitchell

    * When you think ASP.NET, think!
    Scott Mitchell [MVP], Oct 28, 2004
    1. Advertisements

  3. Guest

    Guest Guest

    The image should be in the first <td></td> tags, but it is completely empty.
    <td></td><td></td><td>Caroline Pandolfo</td><td>FW: Employee Reports -
    company Visits - IXOS LHW_EXLK 73

    Guest, Oct 28, 2004
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.