ASP Master pages: How to pass a value from a child page to a SqlDataSource parameter on a master page
<p>Here's a puzzle. A datasource on a master page refers for its SelectParameter to a label control containing some text on a (grand)child page:</p>

<pre><code>&lt;asp:SqlDataSource ... SelectCommand="SELECT * FROM [tblMyTable] WHERE (([strField] = ?) "&gt;
            &lt;SelectParameters&gt;
                &lt;asp:ControlParameter Name="strField" ControlID="cphMaster$cphChild$lblGrandchild" propertyname="Text" DbType="String"/&gt;
            &lt;/SelectParameters&gt;
        &lt;/asp:SqlDataSource&gt;
</code></pre>

<p>but this generates an error ("System.Data.OleDb.OleDbException: Data type mismatch in criteria expression.")</p>

<p>I've checked the obvious (strField really is a string, the ContentPlaceHolder (cph) controls are correctly identified by their IDs).  Any ideas?  </p>

<p>And is my basic approach of 'ControlParameter reading a control placed in a ContentPlaceholder(s)' a reasonable way of passing a value into a SelectParameter?</p>
