i have a gird with columns all are coming from database,this
will bind in item templete in gridview as textboxex.and i
have button below named Update.i want to update all the
records in the grid,but if user change the value of one
textbox,what is the easy way 2 do this



i have a gird with columns all are coming from database,this will bind in item templete in gridvie..

Answer / Indramani Sharma

You can use the DataSource's built-in update functionality after validating changes made by the user. First, bind the GridView with data and set the AutoGenerateEditButton property to true. Then, add an Update command in the SqlDataSource control. When the Update button is clicked, the DataSource will check for any modified fields and update them accordingly. To prevent accidental updates when a single textbox value changes, you can implement validation on the Server-side.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Code Interview Questions

how can we close a web page in asp.net without using jscript?

4 Answers  


Give coding for Implementing a Fixed GridView Header in ASP.NET?

1 Answers  


Code for Getting Information About A File?

1 Answers  


How to Create Scrollable Micro Windows?

2 Answers  


How to add checkbox to datagrid?

5 Answers  


How to send e-mail from an ASP.NET application?

16 Answers   DataPoint, Infosys, Persistent, Radar, TCS, Wipro,


How to get the row index on checking a Checkbox in a ListView

1 Answers  


How we implement the paypal in my website and how we make a payment through Credit Card.

2 Answers  


how to convert Dataset to Object Array or list in c# .net

4 Answers  


How to get the row index on checking a Checkbox in a ListView

1 Answers   TCS,


how to upload an excel in c# ASP.Net?

3 Answers  


Code for Presenting Parent/Child Data in a Data Grid Row?

1 Answers   TCS,


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)