I created a table in the code behind of a web page that contains a user control. I wish to pass that table to the gridview of a usercontrol on my page. Please helpl.
Currently the code behind is passing a SQL string to the usercontrol in the form of a SelectCommand. That works but my job is to strip out all dynamically written calls to the database. So I wrote a parameterized stored procedure that gets the data in
the form of a table. Passing a table is my only option.
How do I tell the gridview to use that table as it's datasource?
Current code:
ucBillingProviderGrid.SelectCommand = strSQL
ucBillingProviderGrid.BindGrid()
I wish to do something like the two lines below, but I get an error: 'datasource' is not a member of 'ASP.commonusercontrols_manageoffice_billingprovidergrid_ascx'.
ucBillingProviderGrid.datasource = tblProviders
ucBillingPr ...
Go to the complete details ...