Last post Jul 08, 2011 09:05 AM by Jaisendme
Jul 06, 2011 12:27 PM|swartzbill2000|LINK
I am trying to create a UserControl named DataSource to encapsulate a SqlDataSource. The UserControl has an InsertParameters property, among others. I have replaced 1 instance of SqlDataSource with DataSource in markup. The project builds with no errors.
I do get warnings. The first is
Content is not allowed between the opening and closing tags for element 'DataSource'.
This is a problem. I need content for things like InsertParameters. How can I get rid of the warning?
Jul 06, 2011 01:12 PM|princeG|LINK
Check here with example
msdn Example: http://msdn.microsoft.com/en-us/library/z72eefad.aspx
with control: http://www.codeproject.com/KB/aspnet/InsertSqlDataSource.aspx
Jul 06, 2011 01:18 PM|swartzbill2000|LINK
Let me explain further. I want to use markup to initialize the UserControl. I get warnings. I think I need a Composite Control instead of a UserControl. I am investigating.
Jul 07, 2011 10:36 PM|Decker Dong - MSFT|LINK
You may then need to override AddedControl
Jul 08, 2011 09:05 AM|Jaisendme|LINK
Yes, You are right.
You have to use composite control.