Formview with ObjectDataSource
I have come across a problem using the formview with an objectdatasource. When using an object datasource a piece of code like
Button test = (Button)frmvDetails.Controls.FindControl("EditButton");
test.Enabled = false;
will generate an error 'Object reference not set to an instance of an object'. Set the formview to reference an SQLDataSource and it is no problem.
I have noticed that if create a new formview and attach it to objectdatasource it will not generate the template code as it does with the SQL code. This is not a problem as it is just a little coding but not being able to reference controls is a problem.
For what I want to do if found the SQLdatasource a problem and the objectdatasource worked really well.
Can anybody help
|All times are GMT. The time now is 10:48 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.