how to call field which is in database

Posted by Oswaldlily under ASP.NET on 8/8/2011 | Points: 10 | Views : 971 | Status : [Member] | Replies : 2
i m updatin gridview using "id" which is oly in database
now in codebehind how to call this id
id=gv.datakeys(e.rowindex).value.tostring

is this crct?




Responses

Posted by: Hmanjarawala on: 8/8/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi,

Girdview has property DataKeyName, specify your this id field there.
after that statement you have written is valid.

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sundarsingh57 on: 8/8/2011 [Member] Starter | Points: 25

Up
0
Down
You have to add the id to gridview while you loading the data to gridview, After that using the id you just update the gridview

Jai Hind

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response