<%@ Page Language="C#" AutoEventWireup="true" CodeFile="probrand.aspx.cs" Inherits="probrand" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel runat="server" id="UpdatePanel" UpdateMode="Always" > <Triggers> <asp:AsyncPostBackTrigger controlid="Btn_Grid"/> </Triggers> <ContentTemplate> <div> <table> <tr> <td><asp:DropDownList ID="ddlitems" runat="server" AutoPostBack="true" onselectedindexchanged="ddlitems_SelectedIndexChanged" CausesValidation="false" ></asp:DropDownList></td> <td><asp:Button ID="Btn_Grid" runat="server" onclick="Btn_Grid_Click" Text="Grid" CausesValidation="false" /></td> </tr> </table> </div> </ContentTemplate> </asp:UpdatePanel> <%-- <asp:ListItem Id="DL1" Text="Lee" runat="server"> </asp:ListItem> <asp:ListItem Id="DL2" Text="Levis" runat="server"> </asp:ListItem> --%> <%--</asp:DropDownList> --%> <asp:GridView ID="GRD" runat="server" AutoGenerateColumns="false"> <Columns> <asp:TemplateField HeaderText="Product_ID"> <ItemTemplate> <asp:Label ID="LblProductID" runat="server" Text='<%#Eval("P_id") %>'> </asp:Label> <asp:TextBox ID="txtProductID" runat="server" Text='<%#Bind("P_id") %>' Visible="false"> </asp:TextBox> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Product_Name"> <ItemTemplate> <asp:Label ID="LblProductName" runat="server" Text='<%#Bind("Product_Name") %>'> </asp:Label> <asp:TextBox ID="TxtProductName" runat="server" Text='<%#Bind("Product_Name")%>' Visible="false"> </asp:TextBox> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Price"> <ItemTemplate> <asp:Label ID="LblPrice" runat="server" Text='<%#Bind("Price") %>'> </asp:Label> <asp:TextBox ID="TxtPrice" runat="server" Text='<%#Bind("Price") %>' Visible="false"> </asp:TextBox> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Brand_Name"> <ItemTemplate> <asp:Label ID="LblBrandName" runat="server" Text='<%#Bind("B_Name") %>'> </asp:Label> <asp:TextBox ID="TxtBrandName" runat="server" Text='<%# Bind("B_Name") %>' Visible="false"> </asp:TextBox> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Edit"> <ItemTemplate> <asp:Button ID="BtnEdit" runat="server" Text="Edit" CommandArgument='<%# Bind("P_id") %>' OnCommand="Edit" /> <asp:Button ID="BtnUpdate" runat="server" Text="Update" CommandArgument='<%# Bind("P_id") %>' OnCommand="Update" /> <asp:Button ID="BtnCancel" runat="server" Text ="Cancel" CommandArgument='<%# Bind("P_id") %>' OnCommand="Cancel" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </div> </form> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)