auto update e-commerce website customer order in admin panel | Auto refresh asp.net Grid view , Auto Refresh Asp.net repeater control, Datalist Control
Default.aspx page
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="1000"></asp:Timer>
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table style=" width:100%; line-height:30px" >
<tr style="background-color:#990000; color:#ffffff; font-weight:bold; font-size:18px">
<%-- <th scope="col" style="width: 04px; visibility:hidden">UserId
</th> --%>
<th scope="col" style="width: 04px" >UserId
</th>
<th scope="col" style="width: 120px"><div style="margin-left:10px">Date &Time </div>
</th>
<th scope="col" style="width: 100px">Order ID
</th>
<th scope="col" style="width: 80px">Full Order
</th>
<%-- <th scope="col" style="width: 120px">Update Order
</th> --%>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<%--<td><asp:Label ID="Labelid" Visible="false" runat="server" Text='<%# Eval("UserId") %>'></asp:Label></td>--%>
<td><asp:Label ID="Labelid" runat="server" Text='<%# Eval("UserId") %>'></asp:Label></td>
<td><asp:Label ID="LabelDT" runat="server" Text='<%# Eval("DT") %>'></asp:Label></td>
<td><asp:Label ID="Labeladdress" runat="server" Text='<%# Eval("OrderID") %>'></asp:Label></td>
<td><a href="AdminFullOrder.aspx?Userid=<%#Eval("Userid")%>" style="color:#cc0000;font-weight:bold" >View Full Order</a></td>
<%-- <td><a href="#" style="color:#cc0000; font-weight:bold">Update Order</a></td>--%>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</ContentTemplate>
</asp:UpdatePanel>
Default.aspx.cs page
protected void Timer1_Tick(object sender, EventArgs e)
{
Repeater1.DataBind();
}
how to set auto refresh in asp.net grid view control
how to set auto refresh in asp.net Repeater control
how to set auto refresh in asp.net Datalist control
how to set auto refresh in asp.net List view control
http://sradhawebcreations.com/
#SradhaWebCreations
Contact : +91-9040573923, +91-7008182025
http://sradhawebcreations.com/
http://sradhawebcreations.blogspot.in/
https://facebook.com/sradhawebcreations
https://www.facebook.com/Sradhawebeducation/
Default.aspx page
- add script manager
- add update panel
- set timer control also set Interval="1000"
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="1000"></asp:Timer>
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table style=" width:100%; line-height:30px" >
<tr style="background-color:#990000; color:#ffffff; font-weight:bold; font-size:18px">
<%-- <th scope="col" style="width: 04px; visibility:hidden">UserId
</th> --%>
<th scope="col" style="width: 04px" >UserId
</th>
<th scope="col" style="width: 120px"><div style="margin-left:10px">Date &Time </div>
</th>
<th scope="col" style="width: 100px">Order ID
</th>
<th scope="col" style="width: 80px">Full Order
</th>
<%-- <th scope="col" style="width: 120px">Update Order
</th> --%>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<%--<td><asp:Label ID="Labelid" Visible="false" runat="server" Text='<%# Eval("UserId") %>'></asp:Label></td>--%>
<td><asp:Label ID="Labelid" runat="server" Text='<%# Eval("UserId") %>'></asp:Label></td>
<td><asp:Label ID="LabelDT" runat="server" Text='<%# Eval("DT") %>'></asp:Label></td>
<td><asp:Label ID="Labeladdress" runat="server" Text='<%# Eval("OrderID") %>'></asp:Label></td>
<td><a href="AdminFullOrder.aspx?Userid=<%#Eval("Userid")%>" style="color:#cc0000;font-weight:bold" >View Full Order</a></td>
<%-- <td><a href="#" style="color:#cc0000; font-weight:bold">Update Order</a></td>--%>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</ContentTemplate>
</asp:UpdatePanel>
Default.aspx.cs page
protected void Timer1_Tick(object sender, EventArgs e)
{
Repeater1.DataBind();
}
how to set auto refresh in asp.net grid view control
how to set auto refresh in asp.net Repeater control
how to set auto refresh in asp.net Datalist control
how to set auto refresh in asp.net List view control
http://sradhawebcreations.com/
#SradhaWebCreations
Contact : +91-9040573923, +91-7008182025
http://sradhawebcreations.com/
http://sradhawebcreations.blogspot.in/
https://facebook.com/sradhawebcreations
https://www.facebook.com/Sradhawebeducation/
No comments:
Post a Comment