Skip to main content

Posts

Showing posts with the label GRIDVIEW

Asp.Net: Passing Gridview control from one page to another page

Hi,     In this post, i will explain how to get gridview control defined in one page into another page. This is accomplished with "Page.PreviousPage" property.     Let Page1.aspx contains a gridview control and we want this gridview (or any object) be passed to another page called page2.aspx. We try this goal in two alternatives ways: Button with PostBackUrl="Page2.aspx" attribute. Server.Transfer("Page2.aspx", true); by coding. In page1.aspx define: Gridview control named - grid Button with postbackUrl="page2.aspx" - btn1 and another Button with click-event - btn2 Markup: <asp:GridView ID="grid" runat="server" AutoGenerateColumns="false" /> <hr/> <asp:Label runat="server" Text="Testing Gridview access to next-Page, try below buttons"></asp:Label> <br /> <asp:Button ID="btn1" runat="server"...

Asp.net insert, Edit, update, delete data in gridview

Introduction: In this article I will explain how to insert, edit, update and delete data in gridview using asp.net. Description:  I have one gridview I need to write code to insert data into gridview after that I need to edit that gridview data and update it and if I want to delete the record in grdview we need to delete record simply by click on delete button of particular row to achieve these functionalities I have used some of gridview events those are  1          1)  Onrowcancelingedit 2          2)  Onrowediting 3          3)  Onrowupdating 4          4)  Onrowcancelingedit 5          5)  Onrowdeleting By Using above griview events we can insert, edit, update and delete the data in gridview. My Question is how we can use these events in our coding before to see those details first design...