I have a 2nd masterpage created from the main masterpage and on the 2nd masterpage is an sqldatasource that inserts data into a table if called.
I am trying to call that sqldatasource from within a newpage based on the 2nd masterpage, but so far I it has proved unsuccessful.
I have tried the following code on a asp button :
dim cph as contentplaceholder = page.master.findcontrol ("contentplaceholder1")
dim data as sqldatasource = cph.findcontrol ("reportaccesssql")
data.insert()
When I test the code, I get message 'Object reference not set to an instance of an object'
What am I doing wrong ?
Thanks
...
Go to the complete details ...