Please solve this..I have been with problem from past 3 hrs..
I have a gridview, which has LocID, Location,City.I have hidden the Locid cloumn.
Upon click of a button , the user selects a location.The location will be displayed in textbox, but the LOcid goes to the hidden value.I have made Locid and Location as Datakeys. I'm able to show the value of Locid( as such :eee000317-aa7e-46ca-a329-0fdac6411ead) in the gridview(if i make it visible="true" for testing purposes),But when i select the location, the hidden value displayes LOCid as 000000-000-0000-0000...
The way i access the id in the code behind is:
Dim LocId As Guid = CType(Me.GrdLocation.DataKeys(e.NewSelectedIndex)("LocID"), Guid)
Dim Loc As String = Me.GrdLocation.DataKeys(e.NewSelectedIndex)("Location")
Label1.Text = Convert.ToString(LocId)
GrdLocation.Visible = False