Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi, there is a listview and I added a button in first column.When I click button, will open other page.In this page, will add information after send session.
But when I click button,session will send selected row.
My kod:

dt.Rows[..][Column] = Session[A].ToString();

I dont know (...)what will be written


What can I do?Thank you
Posted
Comments
sudevsu 6-Jan-16 9:41am    
debug and see what it returns???
ZurdoDev 6-Jan-16 9:48am    
I don't understand your question.

1 solution

The ... should be replaced with the index of the row you want to change. The index for the first row is 0. Bear in mind that the datatable needs to be created and a row with the specified index must already exist. Otherwise you will encounter an exception.

For more information, please see DataRowCollection.Item Property (Int32) (System.Data)[^]

If the row does not yet exist, you should use the NewRow method to create one, see DataTable.NewRow Method (System.Data)[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900