Reputation: 7542
I am trying to get the values from text fields when pressing the update button on a gridview:
The following results in no output:
protected void viewStoryTime_OnRowUpdating(object sender, GridViewUpdateEventArgs e)
{
foreach (DictionaryEntry entry in e.NewValues)
{
System.Diagnostics.Debug.WriteLine(entry.Value);
}
}
What am I doing wrong?
Upvotes: 0
Views: 94
Reputation: 6839
You should use the entry to retrieve the value from the dictionary, thats the problem:
foreach (DictionaryEntry entry in e.NewValues)
{
System.Diagnostics.Debug.WriteLine(e.NewValues[entry.Key])
}
Upvotes: 1