Click here to Skip to main content
15,897,273 members
Home / Discussions / C#
   

C#

 
Questiongrouping is not working Pin
hussain54813-May-15 6:32
hussain54813-May-15 6:32 
Answer[REPOST] Pin
Sascha Lefèvre13-May-15 7:41
professionalSascha Lefèvre13-May-15 7:41 
AnswerRe: grouping is not working Pin
OriginalGriff13-May-15 8:10
mveOriginalGriff13-May-15 8:10 
QuestionShould choose ASP.NET MVC or Xamarin Pin
Ashfaque Hussain13-May-15 4:12
Ashfaque Hussain13-May-15 4:12 
GeneralRe: Should choose ASP.NET MVC or Xamarin Pin
Richard MacCutchan13-May-15 4:31
mveRichard MacCutchan13-May-15 4:31 
GeneralRe: Should choose ASP.NET MVC or Xamarin Pin
Ashfaque Hussain13-May-15 5:44
Ashfaque Hussain13-May-15 5:44 
GeneralRe: Should choose ASP.NET MVC or Xamarin Pin
Richard MacCutchan13-May-15 7:39
mveRichard MacCutchan13-May-15 7:39 
AnswerRe: Should choose ASP.NET MVC or Xamarin Pin
Hitesh Sharma _13-May-15 4:52
Hitesh Sharma _13-May-15 4:52 
GeneralRe: Should choose ASP.NET MVC or Xamarin Pin
Ashfaque Hussain13-May-15 5:45
Ashfaque Hussain13-May-15 5:45 
QuestionC# solving any puzzle with Genetic Algorithms Pin
Member 1168221212-May-15 14:41
Member 1168221212-May-15 14:41 
AnswerRe: C# solving any puzzle with Genetic Algorithms Pin
Sascha Lefèvre12-May-15 15:09
professionalSascha Lefèvre12-May-15 15:09 
QuestionMicrosoft Dynamic AX 2012 Pin
shabeercp11-May-15 19:10
shabeercp11-May-15 19:10 
SuggestionRe: Microsoft Dynamic AX 2012 Pin
Richard MacCutchan11-May-15 21:18
mveRichard MacCutchan11-May-15 21:18 
QuestionMVC3 - Linq query to View Pin
Member 1156707911-May-15 7:25
Member 1156707911-May-15 7:25 
AnswerRe: MVC3 - Linq query to View Pin
Atish Dipongkor11-May-15 7:48
professionalAtish Dipongkor11-May-15 7:48 
GeneralRe: MVC3 - Linq query to View Pin
Member 1156707911-May-15 7:57
Member 1156707911-May-15 7:57 
AnswerRe: MVC3 - Linq query to View Pin
F-ES Sitecore11-May-15 23:42
professionalF-ES Sitecore11-May-15 23:42 
QuestionUpdate in C# using SQL Server Database. Pin
Norris Chappell10-May-15 19:54
Norris Chappell10-May-15 19:54 
AnswerRe: Update in C# using SQL Server Database. Pin
Agent__00710-May-15 20:27
professionalAgent__00710-May-15 20:27 
GeneralRe: Update in C# using SQL Server Database. Pin
Norris Chappell10-May-15 21:03
Norris Chappell10-May-15 21:03 
GeneralRe: Update in C# using SQL Server Database. Pin
Norris Chappell10-May-15 21:07
Norris Chappell10-May-15 21:07 
GeneralRe: Update in C# using SQL Server Database. Pin
Agent__00710-May-15 22:12
professionalAgent__00710-May-15 22:12 
Norris Chappell wrote:
I am getting this error: The name 'id' does not exist in the current context
Yes, that's what I was referring to. You don't have a variable "id" from which you are assigning your "@ID" parameter a value.

Even though your "ID" is an identity column, you will still need its value in order to execute your UPDATE query. How else will you be uniquely identifying the row which you need to be updated? Smile | :)

Here's what you can do (top off my head, as I worked on ASP.NET WebForms a long time ago Smile | :) ):
  1. Select and bind your ID column to your grid but make it invisible.
  2. Use DataKeys[^] property of grid for setting the "ID" field.
  3. While updating a row, retrieve the "ID" value for it using its DataKeys property (and possibly its index).
  4. Use this value to pass in to your update query, i.e. the value for your "@ID" parameter.
You have just been Sharapova'd.

GeneralRe: Update in C# using SQL Server Database. Pin
Norris Chappell11-May-15 5:49
Norris Chappell11-May-15 5:49 
GeneralRe: Update in C# using SQL Server Database. Pin
Norris Chappell11-May-15 6:54
Norris Chappell11-May-15 6:54 
GeneralRe: Update in C# using SQL Server Database. Pin
Mycroft Holmes11-May-15 14:43
professionalMycroft Holmes11-May-15 14:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.