Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I’m going to show on how to delete a certain row in the dynamic GridView with TextBoxes. Note: Before reading this example, be sure to refer my previous examples mentioned above so that you will have a basic idea on how the dynamic does TextBox is being generated in the GridView. Also in this example, I will only focus on the Deletion part so it means that I will not elaborate more on the dynamic TextBox generation. Here are the code blocks below: GRIDVIEW MARKUP (ASPX Source): < asp : gridview ID ="Gridview1" runat ="server" ShowFooter ="true" ...
Posts
Showing posts from 2012
- Get link
- X
- Other Apps
By
varunsharma
-
Save and Retrieve Dynamic TextBox values in GridView to SQL Server Database In my previous article, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes. Now, seems that most of the developers are asking if how to save all the data that was entered from the dynamic textbox in the GridView to the database. So in this example, I’m going to show on how to save them all in the database. To get started then lets create a sample Table in SQL Server. In this example, I named the table as “SampleTable” with the following fields below: Note: I set the Id to auto increment so that the id will be automatically generated for every new added row in the table. To do this select the Column name “Id” and in the column properties set the “Identity Specification” to yes. Now let’s go ahead and proceed to ASPX source and add a Button for saving the data to the database. Take a look at the screen shot below: Now let’s ...
- Get link
- X
- Other Apps
By
varunsharma
-
Adding Dynamic Rows in GridView with TextBoxes Basically, this example shows on how to generate a Row in GridView with TextBoxes when clicking a Button that is residing inside the GridView footer. To get started, let’s grab a GridView control from the Visual Studio Toolbox and put it in the WebForm. The mark up would look something like this: < asp:gridview ID ="Gridview1" runat ="server" ShowFooter ="true" AutoGenerateColumns ="false" > < Columns > < asp:BoundField DataField ="RowNumber" HeaderText ="Row Number" /> < asp:TemplateField HeaderText ="Header 1" > < ItemTemplate > < asp:TextBox ID ="TextBox1" runat ="server" ></ asp:TextBox > </ ItemTemplate > </ asp:TemplateField > < asp:TemplateField ...
CSRF (Cross Site Request Forgery)
- Get link
- X
- Other Apps
By
varunsharma
-

A CSRF attack forces a logged-on victim’s browser to send a request to a vulnerable web application, which then performs the chosen action on behalf of the victim. The following tests are based on an application for fund transfer. The authenticated and authorized user is provided with an interface where he can transfer funds from o ne account to another account. This test can be similarly applied to similar applications with functions identified as critical in the application context such as above, publishing application content thru a CMS, or change password etc. The attack is possible in the following scenario (Tested). 1. The user has opened his mail from the browser window where he already opened his Fund Transfer application in a separate tab as shown in the snapshot above. This is seen in IE 7.0. 2. In case of IE 6, the user needs to create another instance of the browser by selecting File-> New->Window. 3. In case the application is opened in one browser window and only on...