User Name:
Password:
Remember me on this computer
Email:
Hi Sonu,
Is there a way to have multiple datakeys in datalist?
Praveen
Yes, i think there is. Just like GridView, you can specify multiple keys.
DataKeyField
="id,name"
you can access the keys with datalist.DataKeys[index]
I have tried this option but it doesnt work.
Iget a script error saying - Message: Sys.InvalidOperationException: Specified ID,Name does not exists in dataSource.
check the datasource you get, does it even have column names such as id, name?
yes it has. I have even tried on the sample code provided. it doesnt work.
Multiple dataKeyNames are not supported. If you would like to suggest this feature, please add to the issue tracker:
http://ajaxdatacontrols.codeplex.com/WorkItem/List.aspx
oh, I am sorry. The whole time I was thinking you were using a regular asp .net datalist