David Tunnell
David Tunnell

Reputation: 7542

Get inputs from edit TextBoxes when pressing Update on GridView

I am trying to get the values from text fields when pressing the update button on a gridview: enter image description here

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

Answers (1)

Fals
Fals

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

Related Questions