Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Software (http://www.velocityreviews.com/forums/f6-software.html)
-   -   Formview with ObjectDataSource (http://www.velocityreviews.com/forums/t375158-formview-with-objectdatasource.html)

rturner003 10-26-2006 11:26 AM

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[0].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.