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

Friday, November 2, 2018

how to add edit and Delete image in Grid view Command Field | Sradha Webcreations

hoe to add Edit , Delete , Update & Cancel icon Image in Grid View Command Field

use this code in grid view 

                     <asp:ImageButton ID="btnUpdate" runat="server" CommandName="Update" ImageUrl="~/image/thik.jpg" ToolTip="Update" />
                     <asp:ImageButton ID="btnCancel" runat="server" CommandName="Cancel" ImageUrl="~/image/crush.jpg" ToolTip="Cancel" />
                     <asp:ImageButton ID="btnEdit" runat="server" CommandName="Edit" ImageUrl="~/image/edit.jpg" ToolTip="Edit Qty" />
                     <asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" ImageUrl="~/image/delete.jpg" ToolTip="Delte Item" />

delete this code in grid view 

 <%-- <asp:CommandField HeaderText="Cart Order"   ShowEditButton="True" EditText="add Qunatity" ItemStyle-Width="100" >
<ItemStyle Width="100px"></ItemStyle>
                                   <asp:CommandField HeaderText="Delete Order" ShowDeleteButton="True" DeleteText="Delete Item" ItemStyle-Width="100"  >
<ItemStyle Width="100px"></ItemStyle>


how to add Delete icon image in grid view Command Field
how to add Edit icon image in grid view Command Field
how to add Cancel icon image in grid view Command Field
how to add Update icon image in grid view Command Field

Contact : +91-9040573923, +91-7008182025