Hello All,
I have a page which inherits from a Master page. In the contentPlaceHolder, I have placed a formView which is linked to a sqlDataSource. Now for the Select Parameters- I am trying to use ControlParameters. The controls are also placed in the same contentPlaceHolder.
I am trying to access the values of these controls and I have tried the control name as well as the name of the control at run-time. But I can't pass these values on to the formView.
SelectCommand="SELECT [CCAN], [CUST_NAME], [CUST_ADD1], [CUST_ADD2], [CUST_ADD3], [CUST_CITY], [CUST_STATE], [CUST_ZIP] FROM [Contract] WHERE (([CCAN] = @CCAN) AND ([CUST_NAME] = @CUST_NAME))">
<SelectParameters>
<asp:ControlParameter ControlID="fldCCAN" Name="CCAN" PropertyName="Value" Type="Int32" />
<asp:ControlParameter ControlID="fldCustomer" Name="CUST_NAME" PropertyName="Value" Type="String" />
</SelectParameters>
Tried this too:<asp:ControlParameter ControlID="ctl00$cntPlaceHolder$fldCCAN" Name="CCAN" PropertyName="Value" Type="Int32" />
<asp:ControlParameter ControlID="ctl00$cntPlaceHolder$fldCustomer" Name="CUST_NAME" PropertyName="Value" Type="String" />
Can anyone guide me, so that I can solve this problem.
Thanks.