Click here to Skip to main content
15,911,142 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: .NET 3.5 web.config Pin
Shyam Bharath27-Oct-08 1:12
Shyam Bharath27-Oct-08 1:12 
Questionjavascript countdown timer in gridview Pin
VijayVishwakarma25-Oct-08 21:08
VijayVishwakarma25-Oct-08 21:08 
QuestionASP.net forum URGENTLY NEEDED!!! Pin
Meer Osman Ali25-Oct-08 19:57
Meer Osman Ali25-Oct-08 19:57 
AnswerRe: ASP.net forum URGENTLY NEEDED!!! Pin
Meer Osman Ali25-Oct-08 21:12
Meer Osman Ali25-Oct-08 21:12 
GeneralRe: ASP.net forum URGENTLY NEEDED!!! Pin
Vasudevan Deepak Kumar26-Oct-08 10:23
Vasudevan Deepak Kumar26-Oct-08 10:23 
AnswerRe: ASP.net forum URGENTLY NEEDED!!! Pin
Vasudevan Deepak Kumar26-Oct-08 10:21
Vasudevan Deepak Kumar26-Oct-08 10:21 
AnswerCP IGNORE USER Pin
leckey26-Oct-08 12:13
leckey26-Oct-08 12:13 
Questionrepeater header template not displayed on webpage Pin
Ravikumar.Y25-Oct-08 9:52
Ravikumar.Y25-Oct-08 9:52 
Hi,

I have 4 repeaters display some information webpage.I am giving the code here below.please give me the solution.

I have 2 tables.I have display them one below other.I have 2 repeaters in each table.one to display head and other to contents.But when i run the code i could see one header only but the contents in itemtemplate of both repeaters are visible.But the other one which is not visible is rendered when i see in viewsource of the rendered page.

If i comment the databinding code of the other repeater i could see the repeater head which i didn't see before.

This is the code i have written in page load

void Page_Load()

{

repno=int.Parse(Session["repno"].ToString());

username=Session["uname"].ToString();

DataListHeaderBind();

DataListItemsBind();

}

private Void DataListHeaderBind()

{


SqlDataReader drrptAllUsersHead=CMS.GetAllUsers(int repno);

rptAllUsersHead.DataSource=drrptAllUsersHead;
rptAllUsersHead.DataBind();


SqlDataReader drrptUserHead=CMS.GetUserDetails(string username);

rptUserHead.DataSource=drrptUserHead;
rptUserHead.DataBind();

}

Private Void DataListItemsBind()

{

SqlDataReader drrptAllUsers=CMS.GetAllUsers(int repno);

rptAllUsers.DataSource=drrptAllUsers;
rptAllUsers.DataBind();

SqlDataReader drrptUser=CMS.GetUserDetails(string username);

rptUser.DataSource=drrptUser;
rptUser.DataBind();

}

<%@ Page language="c#" Codebehind="UserDetails.aspx.cs" AutoEventWireup="True" Inherits="CMS.UserDetails" MasterPageFile="~/CMS.Master"%>
<%@ MasterType VirtualPath="~/CMS.Master"%>
<asp:Content id="content1" ContentPlaceHolderID="MainContent" runat="server">
<h2><span>Enterprise List</span></h2>
<div class="clear"></div>
<div class="lvl2">
<asp:UpdatePanel runat="server" id="UpdatePanel1">
<ContentTemplate>
<div class="tableWrapper">
<div class="tableOverflow">
<div class="ie6fix">


<table id="Table1" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<asp:Repeater id="rptAllusersHead" runat="server">
<HeaderTemplate>

<th style="width: 5%;">Username</th>
<th style="width: 5%;">FirstName </th>
<th style="width: 6%;">LastName</th>
<th style="width: 9%;">FatherName</th>

</HeaderTemplate>
</asp:Repeater>
</tr>
</thead>
<tbody>
<asp:Repeater ID="rptAllusers" runat="server" >
<ItemTemplate>
<tr class="alignCenter">
<td style="width: 5%" align="center" title='<%# DataBinder.Eval( Container.DataItem, "username" )%>'> </td>

<td style="width: 5%" align="center" title='<%# DataBinder.Eval( Container.DataItem, "firstName" )%>'> </td>

<td style="width: 5%" align="center" title='<%# DataBinder.Eval( Container.DataItem, "lastName" )%>'> </td>

<td style="width: 5%" align="center" title='<%# DataBinder.Eval( Container.DataItem, "fatherName" )%>'> </td>

</tr>
</ItemTemplate>
</asp:Repeater>
</tbody>
</table>
<div><h2> User Details</h2><br/></div>


<table id="Table1" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<asp:Repeater id="rptuserHead" runat="server">
<HeaderTemplate>

<th style="width: 5%;">Username</th>
<th style="width: 5%;">Address </th>
<th style="width: 6%;">City</th>
<th style="width: 9%;">Zip</th>

</HeaderTemplate>
</asp:Repeater>
</tr>
</thead>
<tbody>
<asp:Repeater ID="rptuser" runat="server" >
<ItemTemplate>
<tr class="alignCenter">
<td style="width: 5%" align="center" title='<%# DataBinder.Eval( Container.DataItem, "username" )%>'> </td>

<td style="width: 5%" align="center" title='<%# DataBinder.Eval( Container.DataItem, "address" )%>'> </td>

<td style="width: 5%" align="center" title='<%# DataBinder.Eval( Container.DataItem, "city" )%>'> </td>

<td style="width: 5%" align="center" title='<%# DataBinder.Eval( Container.DataItem, "zip" )%>'> </td>

</tr>
</ItemTemplate>
</asp:Repeater>
</tbody>
</table>
</div>
</div>


<div id="Paging" runat="server" class="pagination">
<asp:Label runat="server" id="lblTotalPages"/>
<asp:TextBox id="txtPageIndex" runat="server" width="50px" visible="false" />
<a id="imgPrev" runat="server" onserverclick="SetCurrentPage" title="Previous"><< Prev</a>
<asp:placeholder id="pages" runat="server"></asp:placeholder>
<a id="imgNext" type="image" onserverclick="SetCurrentPage" runat="server" title="Next">Next >></a>
<asp:Label runat="server" id="lblRecordsPerPage"/>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>



Please give me the solution i have wasted whole day for this.

I even tried taking onther table and putting table1 and table2 in separate rows.It didn't work for me.

I tried by taking two repeaters instead of 4, using HeaderTemplate and ItemTemplate of the same repeater to display header and Contents(Before i used separate repeater to display header and Items) it also not worked.

I could see one header on top of the page even it is in Second table.

Thanks Inadvance,

Ravi
AnswerRe: repeater header template not displayed on webpage Pin
Ravikumar.Y25-Oct-08 23:04
Ravikumar.Y25-Oct-08 23:04 
QuestionAjax timer in gridview. Pin
VijayVishwakarma25-Oct-08 9:34
VijayVishwakarma25-Oct-08 9:34 
QuestionCSS working in IE7 but Not in firefox 2 Pin
AlexeiXX325-Oct-08 7:54
AlexeiXX325-Oct-08 7:54 
AnswerRe: CSS working in IE7 but Not in firefox 2 Pin
Guffa25-Oct-08 17:11
Guffa25-Oct-08 17:11 
GeneralRe: CSS working in IE7 but Not in firefox 2 Pin
AlexeiXX326-Oct-08 17:24
AlexeiXX326-Oct-08 17:24 
GeneralRe: CSS working in IE7 but Not in firefox 2 Pin
Guffa26-Oct-08 23:28
Guffa26-Oct-08 23:28 
QuestionCreating XMLFile in Asp.net How to format the output Pin
zjaffary25-Oct-08 3:13
zjaffary25-Oct-08 3:13 
GeneralData in Gridview ASP .Net on button click event Pin
Shazz Rock25-Oct-08 2:34
Shazz Rock25-Oct-08 2:34 
GeneralRe: Data in Gridview ASP .Net on button click event Pin
NetMan201225-Oct-08 2:48
NetMan201225-Oct-08 2:48 
QuestionWhat is web.config if we are using multiple languges in a website? Pin
NetMan201225-Oct-08 2:20
NetMan201225-Oct-08 2:20 
QuestionHow to use DropDownList with C#.NET Pin
mghiassi24-Oct-08 23:59
mghiassi24-Oct-08 23:59 
AnswerRe: How to use DropDownList with C#.NET Pin
Parwej Ahamad25-Oct-08 0:05
professionalParwej Ahamad25-Oct-08 0:05 
AnswerRe: How to use DropDownList with C#.NET Pin
slSoftware25-Oct-08 7:09
slSoftware25-Oct-08 7:09 
Questionhow to send a email.... Pin
raghvendrapanda24-Oct-08 22:10
raghvendrapanda24-Oct-08 22:10 
AnswerRe: how to send a email.... Pin
Abhijit Jana24-Oct-08 23:30
professionalAbhijit Jana24-Oct-08 23:30 
GeneralRe: how to send a email.... Pin
raghvendrapanda25-Oct-08 0:15
raghvendrapanda25-Oct-08 0:15 
GeneralRe: how to send a email.... Pin
Abhijit Jana25-Oct-08 0:23
professionalAbhijit Jana25-Oct-08 0:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.