C# Syntax for inserting data from gridview to an sqlserver tabe

asp.net , visual csharp , sqlserver2000 Karāchi, Pakistan
  • 10 years ago
    I have displayed data from multiple tables to a gridview while working on an asp.net application. now I want to insert same data of a *selected row * to another table of the same database. What will be the C# syntax for that?
  • 10 years ago
    Hi there are two ways to do this. one in grid view item template place asp.net controls and at that specific row id . find the control at that row that assign these controls to db object properties and than save. 2nd is place sql data source and in insert parameter set the value of grid row and construct your insert query in html design side. I hope i will help you. Regard Muhammad Idrees

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“I invented the term Object-Oriented, and I can tell you I did not have C++ in mind.” - Alan Kay