Getting the current value from a field

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

I am having real difficulty trying to get the current value of a field
on a webform.

Using fieldname.Text doesn't work?

Is there something that I need to do to pull through the current value,
not the existing value.

Cheers
Paul
 
Hi,

show the code of page_load , probably you are rebinding it, or something
like that.

cheers,
 
Now when I click on the edit button it loads a blank datagrid

Edit Command code...

DataGrid1.EditItemIndex = e.Item.ItemIndex;
DataGrid1.DataBind();
 
The main problem I'm having is when I try and update a datagrid.

This is the page load code:

DataGrid1.EditItemIndex = e.Item.ItemIndex;
DataGrid1.DataBind();

and this is what I'm using to get the value out.
String newValue =((TextBox)e.Item.Cells[1].Controls[0]).Text;

But this returns the old value?

Paul
 
Back
Top