I am trying to get the Table shown in the image as layout in a repeater control.Since i am newbie to it
Can someplease guide me on this. The section below Customer number is the only thing that should repeat vertially and I want only two repeats (i.e two item details per page ) on each page
Thank You
<asp:Repeater ID="RepeaterVersionsForPie" runat="server">
<HeaderTemplate>
<table id="VersionsTable">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td class="style3">CustomerNumber</td>
<td class="style4">Test1:</td>
<td class="style5">Test2</td>
<td class="style7">Test3:</td>
<td class="style8">Test4:</td>
</tr>
<tr>
<td class="style9"></td>
<td class="style10"></td>
<td class="style11"></td>
<td class="style12"></td>
<td class="style13"></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
<asp:Repeater ID="RepeaterVersionsForPie" runat="server">
<HeaderTemplate>
<table id="VersionsTable">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td class="style3">CustomerNumber</td>
<td class="style4">Test1:</td>
<td class="style5">Test2</td>
<td class="style7">Test3:</td>
<td class="style8">Test4:</td>
</tr>
<tr>
<td class="style9" colspan="5"></td>
</tr>
<tr>
<td>Item Type:</td>
<td rowspan="3" colspan="4" valign="top">Photo</td>
</tr>
<tr>
<td>Item Number:</td>
</tr>
<tr>
<td>Date:</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
Here's a quick jsfiddle
Related
I have a <asp:Reapter> using basic HTML <table> markup.
My goal is to add a border to <table> cell using CSS, and have it styled as shown in the picture. The third column <td> cell will have a thick solid black border. image
I am having trouble getting this to work, each time the border is too small.
Please help!
<table class="table table-bordered">
<tbody>
<asp:Repeater ID="Repeaterim" runat="server">
<HeaderTemplate>
<thead>
<tr>
<th>Ürün ID</th>
<th style="text-align: center;">Ürün Görsel</th>
<th>Ürün Adı</th>
<th>Ürün Fiyatı</th>
</tr>
</thead>
</HeaderTemplate>
<ItemTemplate>
<tr style="height: 200px;">
<td>
<%# Eval("UrunID") %>
</td>
<td style="background: url('<%# Eval(" UrunGorseli ") %>') no-repeat center;"></td>
<td>
<%# Eval("UrunAdi") %>
</td>
<td>
<%# Eval("UrunFiyati") %>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
<tfoot>
<tr>
<th>Ürün ID</th>
<th style="text-align: center">Ürün Görsel</th>
<th>Ürün Adı</th>
<th>Ürün Fiyatı</th>
</tr>
</tfoot>
</FooterTemplate>
</asp:Repeater>
</tbody>
</table>
This is probably an dumb question but I have a ListView that displays data all in one row like this
Name Address Phone
what I want is to display the data vertically like this
Name
Address
Phone
what do I need to change to accomplish this?
<asp:ListView ID="ListView1" runat="server" >
<ItemTemplate>
<tr id="tbl1" runat="server">
<td><%# Eval("name")%></td>
<td><%# Eval("address")%></td>
<td><%# Eval("phone")%></td>
</tr>
</ItemTemplate>
<LayoutTemplate>
<table id="tbl1" runat="server">
<tr id="tr1" runat="server">
<td id="td1" runat="server">name</td>
</tr>
<tr id="tr2" runat="server">
<td id="td2" runat="server">address</td>
</tr>
<tr id="tr3" runat="server">
<td id="td3" runat="server">phone</td>
</tr>
<tr id="ItemPlaceholder" runat="server">
</tr>
</table>
</LayoutTemplate>
</asp:ListView>
<asp:ListView ID="ListView1" runat="server" >
<LayoutTemplate>
<asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
</LayoutTemplate>
<ItemTemplate>
<table>
<tr>
<td><%# Eval("name") %></td>
</tr>
<tr>
<td><%# Eval("address") %></td>
</tr>
<tr>
<td><%# Eval("phone") %></td>
</tr>
</table>
</ItemTemplate>
</asp:ListView>
I am having a problem with a nested table on my master page, it has been working up until the latest addition I added to one of the nested pages.
In this table i have a asp:contentplaceholder in the body that I use to fill in for the rest of the pages
The table on the master page looks like:
<table class="headermaintable" frame="vSides">
<tr>
<td class="headermaintd">
<table id="MasterTableID" style="height:100%;" class="widewidth" cellpadding="7">
<tr class="headertop">
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
<tr>
<td>...</td>
<td>...</td>
</tr>
<tr>
<td>...</td>
<td>...</td>
</tr>
<tr>
<td>...</td>
<td>
<asp:ContentPlaceHolder id="MainContent" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
<tr>
<td></td>
<td colspan="2" style="border-left:2px solid #000000;">
<a class="BlueLink" href="..." target="_blank">
<asp:Image ID="Image2" runat="server' ImageUrl="~/images/image2.gif" />
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
and what I have found that it is doing, is it is taking the last table row from the nested table and putting into the main table like this:
...
<td>
<asp:ContentPlaceHolder id="MainContent" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
<tr>
<td></td>
<td colspan="2" style="border-left:2px solid #000000;">
<a class="BlueLink" href="..." target="_blank">
<asp:Image ID="Image2" runat="server' ImageUrl="~/images/image2.gif" />
</a>
</td>
</tr>
</td>
</tr>
</table>
I have looked over the html in the other page and all tags are properly opened and closed. Has anyone seen anything similar to this? If you need an example from the nested page its having problems with I can add something.
Thanks to all that can offer helpful advice
<asp:Panel ID="pnlPriceDisc" runat="server" Visible="false">
<asp:DataList ID="dlQtyBreak" RepeatLayout="Table" Runat="Server" width="85%" CellPadding="1" CellSpacing="1">
<HeaderTemplate>
<tr class="style4" bgcolor="#dedede">
<td colspan="5" align="center">
<b>Current Price Breaks</b>
</td>
</tr>
<tr bgcolor="#dedede" class="style4">
<td align="center" width="20%"><b>Low</b></td>
<td align="center" width="20%"><b>High</b></td>
<td align="center" width="20%"><b>Price</b></td>
<td align="center" width="20%"><b>Sale Price</b></td>
<td align="center" width="20%"><b>Delete</b></td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr class="style5" bgcolor="#eeeeee">
<td align="center" valign="middle" width="20%">
<asp:TextBox id="txtPBLowQty" ... />
<asp:RequiredFieldValidator ... />
<asp:RegularExpressionValidator ... />
</td>
<td align="center" valign="middle" width="20%">
<asp:TextBox id="txtPBHighQty"... />
<asp:RequiredFieldValidator ... />
<asp:RegularExpressionValidator ... />
</td>
<td align="center" valign="middle" width="20%">
<asp:TextBox id="txtPBPrice" ../ />
<asp:RequiredFieldValidator ... />
<asp:RegularExpressionValidator ... />
</td>
<td align="center" valign="middle" width="20%">
<asp:TextBox id="txtPBSalesPrice" ... />
<asp:RegularExpressionValidator ... />
</td>
<td align="center" valign="middle" width="20%">
<asp:Button id="btnPBDelete" ... />
<asp:Label id="lblPBLinenum" ... />
</td>
</tr>
</ItemTemplate>
</asp:DataList>
<table width="85%" id="PBRowAdd" runat="server" cellpadding="1" cellspacing="1" visible="false">
<tr bgcolor="#eeeeee" class="style5">
<td align="center" valign="middle" width="20%">
<asp:TextBox id="txtPBLowQtyAdd" ... />
<asp:RequiredFieldValidator ... />
<asp:RegularExpressionValidator .../>
</td>
<td align="center" valign="middle" width="20%">
<asp:TextBox id="txtPBHighQtyAdd" ... />
<asp:RequiredFieldValidator ... />
<asp:RegularExpressionValidator ... />
</td>
<td align="center" valign="middle" width="20%">
<asp:TextBox id="txtPBPriceAdd" ... />
<asp:RequiredFieldValidator ... />
<asp:RegularExpressionValidator ... />
</td>
<td align="center" valign="middle" width="20%">
<asp:TextBox id="txtPBSalesPriceAdd" ... />
<asp:RegularExpressionValidator ... />
</td>
<td align="center" valign="middle" width="20%">
<asp:Button id="btnPBAddNew" ... />
</td>
</tr>
</table>
<br>
<table>
<tr>
<td>
<asp:Button ID="btnPBRowAdd" .../>
<asp:button id="btnPBBack" ... />
<asp:button id="btnPBUpdateQtyBreakList" ... />
</td>
</tr>
</table>
</asp:Panel>
Now in this example is the only one I have found where it causes the issue, and if I hide table "PBRowAdd" the issue goes away, but as soon as I make the table visible it causes the problem. What is it doing to cause it?
Again thanks to anyone who can offer help on the issue.
i am new to AJAX i am trying to update a Repeater Control When user Click on Search Button which is out side the updatePanel using Trigger event of UpdatePanel the CSS get Distorted when Repeater Control is Placed inside UpdatePanel Whhen the Update Panel is Removed Then the CSS is applied perfectly why does it happen?
Code:
<div class="jqueryresultsBackground">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Repeater ID="ResultsRepeater" runat="server">
<HeaderTemplate>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<table align="center" width="100%">
<tr>
<td align="left" class="searchResFieldName" width="40%">
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/deleted.png"
Style="z-index: 1; position: absolute; margin-left: -5px;"
Visible='<%# DeletedImageVisibility(Eval("IsActive"))%>' />
<br />
<%# Eval("UnicodeFullName")%>
</td>
<td width="10%">
Col1
</td>
</tr>
</table>
</td>
<td width="10%">
Col2
</td>
<td width="10%">
Col3
</td>
<td width="8%">
Col4
</td>
<td width="5%">
Col5
</td>
<td width="10%">
Col6
</td>
</tr>
<tr>
<td align="left" class="searchResFieldName" width="35%">
<%# Eval("EnglishFullName")%>
</td>
<tr>
<td align="left">
<%# Eval("HouseNumber")%>
<br />
<%# Eval("UnicodeAddress")%>
</td>
<td>
<b><%# Eval("ConstituencyNumber")%></b>
</td>
<td>
<b><%# Eval("PartNumber")%></b>
</td>
<td>
<b><%# Eval("SerialInPart")%></b>
</td>
<td>
<b><%# Eval("Age")%></b>
</td>
<td>
<b><%# Eval("Sex")%></b>
</td>
<td>
<b><%# Eval("CardNo")%></b>
</td>
</tr>
<tr>
<td>
<%# Eval("Address")%>
</td>
<tr>
<td>
</td>
<td align="left" class="searchResPrabhag" colspan="7">
</td>
</tr>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<hr />
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
<tr>
<td>
</td>
</tr>
</table>
</FooterTemplate>
</asp:Repeater>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="SearchButton" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:HiddenField ID="CurrentPageHiddenField" runat="server" />
</div>
Your HTML is broken... The HeaderTemplate is closing your table.
I am trying to use the ListView control to show a list of data from the database as following:
Employee Name: xxxxxxxxx ID: 111111
Job Title: yyyyyxxxx Organization: uuuuuu
which means I want to list the data in a table of 4 columns that orders as following:
Property Value Property Value
I modified the to get this style and I succeeded. My problem now is to retrieve data from the database in both value columns. I don't know how to do that.
Part of my code:
<LayoutTemplate>
<table border="0" cellpadding="1">
<tr style="background-color:#003366; color:white">
<th align="left"> Employee Name </th>
<td>
</td>
<th align="left">ID</th>
<td></td>
</tr>
<tr style="background-color:#003366; color:white">
<th align="left">Job Title.</th>
<td></td>
<th align="left">Organization</th>
<td></td>
</tr>
<tr id="itemPlaceholder" runat="server">
</tr>
</table>
</LayoutTemplate>
<LayoutTemplate>
<table border="0" cellpadding="1">
<tr style="background-color:#003366; color:white">
<th align="left"> Employee Name </th>
<td>
</td>
<th align="left">ID</th>
<td></td>
</tr>
<tr style="background-color:#003366; color:white">
<th align="left">Job Title.</th>
<td></td>
<th align="left">Organization</th>
<td></td>
</tr>
<asp:PlaceHolder id="itemPlaceholder" runat="server" />
</table>
</LayoutTemplate>
<ItemTemplate>
<tr style="background-color:#003366; color:white">
<td align="left"></td>
<td><%# Eval("EmployeeName")%></td>
<td align="left"></td>
<td><%# Eval("ID")%></td>
</tr>
<tr style="background-color:#003366; color:white">
<td align="left"></td>
<td><%# Eval("JobTitle")</td>
<td align="left"></td>
<td><%# Eval("Organization")</td>
</tr>
</ItemTemplate>
The Eval statements depend on your datasource