Saturday, November 3, 2018

how to auto refresh Grid view |Sradha Webcreations

auto update e-commerce website customer  order in admin panel | Auto refresh Grid view ,  Auto Refresh repeater control, Datalist Control

  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">
                          <asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="1000"></asp:Timer>
  <asp:Repeater ID="Repeater1" runat="server">
                                <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 scope="col" style="width: 120px"><div style="margin-left:10px">Date &Time  </div>
                                <th scope="col" style="width: 100px">Order ID
                                <th scope="col" style="width: 80px">Full Order
                              <%--  <th scope="col" style="width: 120px">Update Order
                                </th>  --%>
                              <%--<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>--%>




Default.aspx.cs page
  protected void Timer1_Tick(object sender, EventArgs e)

how to set auto refresh in grid view control
how to
set auto refresh in Repeater control
how to
set auto refresh in Datalist control
how to
set auto refresh in List view control

Contact : +91-9040573923, +91-7008182025

No comments:

Post a Comment