Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Referring to Data Source Controls across Content Controls

Reply
Thread Tools

Referring to Data Source Controls across Content Controls

 
 
Bill Nicholson
Guest
Posts: n/a
 
      09-10-2007
A page has 2 Content Controls. One Object Data Source is in one of
those Content Controls. There are Data Controls in both Content
Controls that can use the Object Data Source. At design time, VS 2005
will let you assign the Object Data Source to both of the Data
Controls. However, at runtime, the app Yellow Screens because the
Object Data Source cannot be resolved unless it's in the same Content
Control as the Data Control.

"The DataSourceID of 'GridViewSample' must be the ID of a control of
type IDataSource. A control with ID 'ObjectDataSourceSample' could
not be found."


Also, you can't have a Object Data Source control with the same name
in two different Content Controls. VS 2005 prevents that.

Therefore you end up with the exact same identical Object Data Source
in two places in the aspx code, each with a different name. A
maintenance nightmare.

Am I missing something? Is there a better way to do this?

Thanks,

Bill
Cincinnati, OH USA

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Capturing Referring URL to drive content slamar ASP .Net 0 08-17-2011 04:02 PM
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
Data Recovery SOURCE CODE ( SOURCE CODES of Professional Data Recovery Software ) Author Tarun Tyagi C Programming 0 12-29-2004 05:10 PM
Data Recovery SOURCE CODE ( SOURCE CODES of Professional Data Recovery Software ) Author Tarun Tyagi Cisco 0 12-29-2004 05:03 PM
Referring to a frame's content from another frame Microsoft ASP .Net 3 10-04-2004 06:35 AM



Advertisments