Need help! I can't get around why this doesn't work.
Page:
<asp:SqlDataSource ID="SelectUserInfo" runat="server" ConnectionString="<%$ ConnectionStrings:TradeRelay %>" SelectCommand="admin_userinfo" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter Name="suser" Type="String" DefaultValue="Anonymous" />
</SelectParameters>
</asp:SqlDataSource>
CodeBehind:
protected void Page_Init(object sender, EventArgs e)
{
SelectUserInfo.SelectParameters["suser"].DefaultValue = User.Identity.Name;
}
Error:
Could not find control 'suserParam' in ControlParameter 'suser'
UPD:
ControlID="suserParam"
was wrong! Thanks!