Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Access in ASP.net 2.0

Status
Not open for further replies.

toptomato

Programmer
Jul 22, 2005
62
US
hi folks,
asp.net 1.1 Senario: embeded link button with the command name of 'SAVE' is fired in a datagrid. DataGrid's ItemCommand method is called and in that method we can use the following commands to get the necesary information we need to do our tasks:
e.Item.ItemIndex ---> to get the index of the row where the event was fired
e.Item.DataItem ----> to get the get the datarowview.

DataRowView drv = (DataRowView)e.Item.DataItem;
then we can use the following to get the values for each item:
string username=(string)drv["user name"];

we were also able to:
ExampleTypedDataSet.ExampleTypedDataSetTable.ExampleTypedDataSetTableRow datarow = (ExampleTypedDataSet.ExampleTypedDataSetTable.ExampleTypedDataSetTableRow)drv.row;

to get the original datarow to get the values we need.
How do we do all that in ASP.Net 2.0
help. thank guys.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top