Using Controls and Datasources from different ContentPlaceHolders

If you have a SqlDataSource control and a combobox on one contentplaceholder, and the gridview and datasource on another contentplaceholder, you will have problems associating the combobox to filter the gridview if you don’t use the example below to call the taget contentplaceholder and put a “$” between it and the controlID of the combobox…

 <asp:SqlDataSource       ... >
            <asp:ControlParameter ControlID="TheContentPlaceHolderID$TheControID" ... />

~ by worldcrossings on July 18, 2010.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: