Fix TD height Width + Repeater

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2008
Posts: 324
Reputation: sonia sardana has a little shameless behaviour in the past 
Solved Threads: 7
sonia sardana sonia sardana is offline Offline
Posting Whiz

Fix TD height Width + Repeater

 
0
  #1
Oct 1st, 2009
SOURCE CODE
  1.  
  2. <asp:Repeater ID="Repeater1" runat="server">
  3. <HeaderTemplate>
  4. <table border="1" width="100%">
  5. <tr bgcolor=Gray>
  6. <th>ProductId</th>
  7. <th>ProductName</th>
  8. <th>Description</th>
  9. <th>Weight</th>
  10. <th>isInStock</th>
  11. </tr>
  12. </HeaderTemplate>
  13.  
  14. <ItemTemplate>
  15. <tr>
  16. <td width ="10%" height ="50%"><%# DataBinder.Eval(Container.DataItem,"ProdID") %></td>
  17. <td width ="10%" height ="50%"><asp:HyperLink id="hlEdit" runat="server" NavigateUrl="Frmuser.aspx" Text='<%# DataBinder.Eval(Container.DataItem, "ProdName") %>'></asp:HyperLink></td>
  18. <td width ="10%" height ="50%" ><%# DataBinder.Eval(Container.DataItem,"Descr") %></td>
  19. <td width ="10%" height ="50%" ><%# DataBinder.Eval(Container.DataItem,"Weight") %></td>
  20. <td width ="10%" height ="50%" ><%# DataBinder.Eval(Container.DataItem,"islnStock") %></td>
  21. </tr>
  22. </ItemTemplate>
  23.  
  24. <AlternatingItemTemplate>
  25. <tr bgcolor="#ccccff">
  26. <td width ="10%" height ="50%"><%# DataBinder.Eval(Container.DataItem,"ProdID") %></td>
  27. <td width ="10%" height ="50%"><asp:HyperLink id="hlEdit" runat="server" NavigateUrl="Frmuser.aspx" Text='<%# DataBinder.Eval(Container.DataItem, "ProdName") %>'></asp:HyperLink></td>
  28. <td width ="10%" height ="50%" ><%# DataBinder.Eval(Container.DataItem,"Descr") %></td>
  29. <td width ="10%" height ="50%" ><%# DataBinder.Eval(Container.DataItem,"Weight") %></td>
  30. <td width ="10%" height ="50%" ><%# DataBinder.Eval(Container.DataItem,"islnStock") %></td>
  31. </tr>
  32. </AlternatingItemTemplate>
  33.  
  34. <FooterTemplate>
  35. </table>
  36. </FooterTemplate>
  37. </asp:Repeater>

  1. public partial class FrmMain : System.Web.UI.Page
  2. {
  3. SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["Connection"].ConnectionString);
  4. SqlDataAdapter da;
  5. DataSet ds = new DataSet();
  6. string query;
  7. SqlCommand cmd;
  8.  
  9. protected void Page_Load(object sender, EventArgs e)
  10. {
  11.  
  12. try
  13. {
  14.  
  15. da = new SqlDataAdapter("SELECT * FROM Products", conn);
  16. da.Fill(ds, "PRODUCTS");
  17. Repeater1.DataSource = ds.Tables["PRODUCTS"];
  18. Repeater1.DataBind();
  19.  
  20. }
  21.  
  22. catch (Exception ex)
  23. {
  24.  
  25. }
  26.  
  27.  
  28. }

Only Probs is dat i want to fix the height & width of TD.See the Description (TD) is having too much height.I wnat to fix it.See i pic.
Attached Thumbnails
Arexoo.JPG  
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 324
Reputation: sonia sardana has a little shameless behaviour in the past 
Solved Threads: 7
sonia sardana sonia sardana is offline Offline
Posting Whiz

Re: Fix TD height Width + Repeater

 
0
  #2
Oct 1st, 2009
Nobody knows the answer or nobody wants to reply?????
Reply With Quote Quick reply to this message  
Reply

Message:




Views: 326 | Replies: 1
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC