Last post Apr 06, 2008 09:39 PM by iversr
Apr 02, 2008 09:31 AM|iversr|LINK
I'm just learning how to write custom controls so please forgive any stupid questions.
I created a simple control that consists of a SQLDataSource and a DropDownList. I would like to be able to set a property value on the custom control that determines which records from the data source are added to the drop down.
I added a property to the custom control. In the SQLDataSource I use the control property to filter the data from the database. After adding an instance of the custom control to a web page, I set the property value in the page load event and run it. I get
an error that says "Input string was not in correct format". I'm not sure what that means in this context.
This is very difficult to explain but I was hoping someone has some suggestions that might help me make some progress.
Apr 02, 2008 10:05 AM|DotNetAdvisor|LINK
Can you post your sourceview for the control? I'd like to look at the datasource declaration.
Also, I just recently posted an article about using events to do exactly what you're trying to do. Take a look.
Apr 02, 2008 10:21 AM|Som Nath Shukla|LINK
make sure in value propery ur giving the right column name.
Apr 06, 2008 09:39 PM|iversr|LINK
Sorry I didn't get back to this post sooner. Your suggestions got me going. As I suspected, it's all in the timing of when the control is used.