Help On datalist alignment

Posted by Vijayar under C# on 9/12/2011 | Points: 10 | Views : 9117 | Status : [Member] | Replies : 1
<table >

<asp:DataList ID="DataList1" runat="server" RepeatColumns="3" RepeatDirection="Horizontal"
Width="370px" RepeatLayout="Table" ItemStyle-Wrap="true"
<ItemStyle Wrap="True" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
<div align="center" style="float: left; width: 95px; height: 100px; overflow: hidden;
padding: 1px; margin: 5px 0px 5px 0px; border-right: 1px #DAD9DA dotted;">

<table id="Table1" cellpadding="1" cellspacing="1" visible="true" width="100%">

<td align="left" width="150px"><asp:Image ID="Image1" Height="50px" Width="50px" ImageUrl='<%# Eval("Image")%>' class="border" runat="server"/></td>
<td align="left" width="110px"><asp:Label ID="lblEmpName" runat="server" ForeColor="#000000" Text='<%# Eval("PostBy")%>' class="description"/></td>
<td align="left" width="110px"><asp:Label ID="Label3" runat="server" ForeColor="#000000" Text='<%# DataBinder.Eval(Container.DataItem,"Prosper Wall Posts")%>' class="description"/></td>


<table width="370px">
<td>Select Topic </td>


<asp:DropDownList ID="ddl"
runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddl_SelectedIndexChanged">




<td> <asp:TextBox ID="txtmessage" runat="server" Visible="false" AutoPostBack="true" OnTextChanged="txtmessage_TextChanged"></asp:TextBox></td>
<td colspan="2">

<asp:ImageButton ID="save" runat="server" ImageUrl="../prosper_images/sub_btn.png" OnClick="save_Click"/>



iam using data;ist to dispaly 3 columns in single row ,then again i opened a table and places a dropdown and save button ,but in runtime iam able to see image bound fields only in datalist all other fields are not appearing what is the problem.Please bhelp me in this issue .It's very urgent

If i place in different tr they are appearing but not in single tr



Posted by: Jpchoudhari on: 9/13/2011 [Member] Starter | Points: 25


Try to nest your elements properly. Do you want the second table inside datalist?? (you have closed datalist before that)
div tag is not closed.
Nest your table inside td tag of parent. Try to check your resulting html you may get idea.

Kind Regards,

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response