Posts

Showing posts with the label GridView

Store and View PDF Files in a GridView

Image
Look at the following procedure. Step 1:  Database Structure . Query Create a table named tbl_pdf. WebConfig Upload.aspx Code <asp:FileUpload ID= "”FileUpload”"  runat=”server” /> <asp:Button ID= "”btnsubmit”"  runat=”server” Text=”Upload”  />   <asp:Button ID= "”btncancel”"  runat=”server” Text=”Cancel” /> <asp:Label ID= "”alert”"  runat=”server”></asp:Label>   <asp:GridView ID= "”GridView1″"  runat=”server” /> <asp:Label ID= "”Label1″"  runat=”server”></asp:Label>   Screen Upload.aspx.cs Step 2:  Storing PDF files into database . Source Code protected   void  btnsubmit_Click( object  sender, EventArgs e)   {      try       {       ...

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

Image
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  table in dat...