944,004 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 1526
  • ASP.NET RSS
Oct 1st, 2009
0

Fix TD height Width + Repeater

Expand Post »
SOURCE CODE
ASP.NET Syntax (Toggle Plain Text)
  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>

ASP.NET Syntax (Toggle Plain Text)
  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
Click image for larger version

Name:	Arexoo.JPG
Views:	37
Size:	36.1 KB
ID:	11887  
Similar Threads
Reputation Points: 0
Solved Threads: 8
Posting Whiz
sonia sardana is offline Offline
326 posts
since Mar 2008
Oct 1st, 2009
0

Re: Fix TD height Width + Repeater

Nobody knows the answer or nobody wants to reply?????
Reputation Points: 0
Solved Threads: 8
Posting Whiz
sonia sardana is offline Offline
326 posts
since Mar 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: ViewChanged Event is not firing
Next Thread in ASP.NET Forum Timeline: Sending value of checkboxes to new page?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC