troubleshooting Question

SQL Data Source, connection string, and update

Avatar of 5281
5281 asked on
.NET ProgrammingC#ASP.NET
6 Comments2 Solutions379 ViewsLast Modified:
Hi,

I used wizard and created sql data source, and binded a gridview to it, this gridview has an edit link, click edit link, it will show Update and Cancel link.  It works fine.

I want to know how to connect to the database (the existing sqldatasource) in the code behind and update a record.  When user click Edit link, then input some text into a textbox, and then click Update link, it will automatically update database now, but I also want to manually update the status field for this record to Closed.  How to do that in the code behind?  I need some code.  This is C# application.  Thank you in advance.

ASKER CERTIFIED SOLUTION
pragmatistMS

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros