Question : unable to pull data from detailviews on a webpage in a class's properties

I have three detailview objects on an ASP.NET 3.5 page, whose datakey values I can read in the code behind file using a function
Public Function fetchDetailsValue(ByRef objname As DetailsView, ByVal keyidx As Int16) As String
        Return detDetails.DataKey.Values("HPOVID")
    End Function
These values are used to populate the properties of a class which will then be used to send updates out to a web service.

However, as soon as I move the reference to the detailview's datakey into the get property in a class I'm trying to build, I get the following error
"reference to a non-shared member requires an object reference"

I'm guessing the class can't see the contents of the page, so how can I point it at these objects?

Answer : unable to pull data from detailviews on a webpage in a class's properties

OK - it does not matter that the source and destination are the same.  

insert into myTable
(QuestId, MagId, ProfId, AnsId, Comments, GroupCode)
Select QuestId, MagId, 'new value for ProfId' as ProfId, AnsId, Comments, GroupCode
from
myTable T2
where T2.IsNew = 1    -- obviously, subsitute your own logic in the where clause

If you simply execute this against the server rather than bringing everything locally and iterating through each record it will be MUCH faster


Random Solutions  
 
programming4us programming4us