I have a button within a DetailsView control that I want to trigger an Insert for a Datasource that is also within the DetailsView
There is an OnClick event handler for the button but I'm having problems finding the datasource to trigger it the code I'm using is
Expand|Select|Wrap|Line Numbers
- Dim DataSource As SqlDataSource = CType(getFriendRequests.FindControl("approveFriend"), SqlDataSource)
- DataSource.Update()
"getFriendRequests" is the name of the Details View and "approveFriend" is the name of the datasource I want to find
using the code above it can't find the datasource and returns a null error
any help would be great,
Thanks
Luke