D
David C
I am getting the error below when opening my web page. I have tried
everything I can think of for referencing the ControlID on my
SelectParameter section. Can anyone help? Also, the asp.net code is below
that.
David
An unhandled exception occurred:
Message: Could not find control
'ContentPlaceHolder1$gvPayrollDomestic$txtWCCodeValue' in ControlParameter
'WCCode'.
Stack Trace:
at System.Web.UI.WebControls.ControlParameter.Evaluate(HttpContext
context, Control control)
at System.Web.UI.WebControls.Parameter.UpdateValue(HttpContext context,
Control control)
at System.Web.UI.WebControls.ParameterCollection.UpdateValues(HttpContext
context, Control control)
at
System.Web.UI.WebControls.SqlDataSource.LoadCompleteEventHandler(Object
sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Page.OnLoadComplete(EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
<asp:UpdatePanel ID="UpdatePanel1" runat="server"
UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="gvPayrollDomestic" runat="server"
AutoGenerateColumns="False"
DataKeyNames="PayrollID"
DataSourceID="SqlPayrollDomestic"
ForeColor="Black" Font-Size="Smaller"
Font-Names="Arial" BackColor="LightGoldenrodYellow"
BorderColor="Tan" BorderWidth="1px">
<Columns>
<asp:CommandField ShowDeleteButton="True"
ShowEditButton="True" />
<asp:BoundField DataField="PayrollDomesticID"
HeaderText="PayrollDomesticID"
InsertVisible="False" ReadOnly="True"
SortExpression="PayrollDomesticID" Visible="False" />
<asp:BoundField DataField="PropertyID"
HeaderText="PropertyID"
SortExpression="PropertyID" Visible="False" />
<asp:TemplateField HeaderText="State"
SortExpression="StateProvince">
<EditItemTemplate>
<aspropDownList
ID="ddlDomPayrollStateID" runat="server" DataSourceID="SqlStateProvince"
SelectedValue='<%#
Bind("DomPayrollStateID") %>' Width="150"
DataTextField="StateProvince"
DataValueField="StateProvinceID" AppendDataBoundItems="True">
<asp:ListItem Text=""
Value=""></asp:ListItem>
</aspropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblDomPayrollStateID"
runat="server" Text='<%# Bind("StateProvince") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="WC Code"
SortExpression="WCCodeValue">
<EditItemTemplate>
<asp:TextBox ID="txtWCCodeValue"
runat="server" Text='<%# Bind("WCCodeValue") %>'
ontextchanged="txtWCCodeValue_TextChanged" Width="100"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="txtWCCodeValue"
runat="server" Text='<%# Bind("WCCodeValue") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="WC Class Code"
SortExpression="WCCodeID">
<EditItemTemplate>
<aspropDownList ID="ddlWCCodeID"
runat="server" DataSourceID="SqlWCClassCodes"
SelectedValue='<%#
Bind("WCCodeID") %>' Width="250"
DataTextField="WCCodeDesc"
DataValueField="WCCodeID" AppendDataBoundItems="True">
<asp:ListItem Text=""
Value=""></asp:ListItem>
</aspropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblWCCodeID" runat="server"
Text='<%# Bind("WCCodeDesc") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:SqlDataSource ID="SqlWCClassCodes" runat="server"
ConnectionString="<%$ ConnectionStrings:RiskdataConnectionString
%>"
SelectCommand="SELECT [WCCodeID], [WCCodeDesc], [WCCodeValue]
FROM [WCClassCodes] ORDER BY [WCCodeSort]">
<SelectParameters>
<asp:ControlParameter Name="WCCode" PropertyName="Text"
ControlID="gvPayrollDomestic$txtWCCodeValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
everything I can think of for referencing the ControlID on my
SelectParameter section. Can anyone help? Also, the asp.net code is below
that.
David
An unhandled exception occurred:
Message: Could not find control
'ContentPlaceHolder1$gvPayrollDomestic$txtWCCodeValue' in ControlParameter
'WCCode'.
Stack Trace:
at System.Web.UI.WebControls.ControlParameter.Evaluate(HttpContext
context, Control control)
at System.Web.UI.WebControls.Parameter.UpdateValue(HttpContext context,
Control control)
at System.Web.UI.WebControls.ParameterCollection.UpdateValues(HttpContext
context, Control control)
at
System.Web.UI.WebControls.SqlDataSource.LoadCompleteEventHandler(Object
sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Page.OnLoadComplete(EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
<asp:UpdatePanel ID="UpdatePanel1" runat="server"
UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="gvPayrollDomestic" runat="server"
AutoGenerateColumns="False"
DataKeyNames="PayrollID"
DataSourceID="SqlPayrollDomestic"
ForeColor="Black" Font-Size="Smaller"
Font-Names="Arial" BackColor="LightGoldenrodYellow"
BorderColor="Tan" BorderWidth="1px">
<Columns>
<asp:CommandField ShowDeleteButton="True"
ShowEditButton="True" />
<asp:BoundField DataField="PayrollDomesticID"
HeaderText="PayrollDomesticID"
InsertVisible="False" ReadOnly="True"
SortExpression="PayrollDomesticID" Visible="False" />
<asp:BoundField DataField="PropertyID"
HeaderText="PropertyID"
SortExpression="PropertyID" Visible="False" />
<asp:TemplateField HeaderText="State"
SortExpression="StateProvince">
<EditItemTemplate>
<aspropDownList
ID="ddlDomPayrollStateID" runat="server" DataSourceID="SqlStateProvince"
SelectedValue='<%#
Bind("DomPayrollStateID") %>' Width="150"
DataTextField="StateProvince"
DataValueField="StateProvinceID" AppendDataBoundItems="True">
<asp:ListItem Text=""
Value=""></asp:ListItem>
</aspropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblDomPayrollStateID"
runat="server" Text='<%# Bind("StateProvince") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="WC Code"
SortExpression="WCCodeValue">
<EditItemTemplate>
<asp:TextBox ID="txtWCCodeValue"
runat="server" Text='<%# Bind("WCCodeValue") %>'
ontextchanged="txtWCCodeValue_TextChanged" Width="100"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="txtWCCodeValue"
runat="server" Text='<%# Bind("WCCodeValue") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="WC Class Code"
SortExpression="WCCodeID">
<EditItemTemplate>
<aspropDownList ID="ddlWCCodeID"
runat="server" DataSourceID="SqlWCClassCodes"
SelectedValue='<%#
Bind("WCCodeID") %>' Width="250"
DataTextField="WCCodeDesc"
DataValueField="WCCodeID" AppendDataBoundItems="True">
<asp:ListItem Text=""
Value=""></asp:ListItem>
</aspropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblWCCodeID" runat="server"
Text='<%# Bind("WCCodeDesc") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:SqlDataSource ID="SqlWCClassCodes" runat="server"
ConnectionString="<%$ ConnectionStrings:RiskdataConnectionString
%>"
SelectCommand="SELECT [WCCodeID], [WCCodeDesc], [WCCodeValue]
FROM [WCClassCodes] ORDER BY [WCCodeSort]">
<SelectParameters>
<asp:ControlParameter Name="WCCode" PropertyName="Text"
ControlID="gvPayrollDomestic$txtWCCodeValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>