ASP.net web controls
-
Hi .. am getting error like this..can anyone help..in my pageload there is no errors ..only 1 error from aspx page Error:does not contain a definition for 'ddlYear_SelcetedIndexChanged'
<%@ Register TagPrefix="users" TagName="YearDropdownList" Src="~/UserControls/YearListBox1.ascx" %>
.aspx
.aspx.cs
pageload:
protected void dd1Year_SelectedIndexChanged(Object sender, EventArgs e)
{
//callling string from my user control
sYear = ddlYear.SelectedValue.Trim();
} -
Hi .. am getting error like this..can anyone help..in my pageload there is no errors ..only 1 error from aspx page Error:does not contain a definition for 'ddlYear_SelcetedIndexChanged'
<%@ Register TagPrefix="users" TagName="YearDropdownList" Src="~/UserControls/YearListBox1.ascx" %>
.aspx
.aspx.cs
pageload:
protected void dd1Year_SelectedIndexChanged(Object sender, EventArgs e)
{
//callling string from my user control
sYear = ddlYear.SelectedValue.Trim();
}Why do you show us the 'register' part ? Is the event inside the control's .cs file ?
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
-
Why do you show us the 'register' part ? Is the event inside the control's .cs file ?
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
You mean Usercontrol .cs file..Yeah i wrote my method in usercontrol..i am calling stored procedure in usercontrol to display list of years..
-
You mean Usercontrol .cs file..Yeah i wrote my method in usercontrol..i am calling stored procedure in usercontrol to display list of years..
I notice you use Object instead of object, but I'm not sure that should matter. Other than that, I see no reason, if the control is in usercontrol.aspx and the event is in usercontrol.aspx.cs, for there to be an issue.
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
-
Hi .. am getting error like this..can anyone help..in my pageload there is no errors ..only 1 error from aspx page Error:does not contain a definition for 'ddlYear_SelcetedIndexChanged'
<%@ Register TagPrefix="users" TagName="YearDropdownList" Src="~/UserControls/YearListBox1.ascx" %>
.aspx
.aspx.cs
pageload:
protected void dd1Year_SelectedIndexChanged(Object sender, EventArgs e)
{
//callling string from my user control
sYear = ddlYear.SelectedValue.Trim();
}Have you copy and pasted the code snippets and the error message? I ask because the method name in the error message doesn't match those in the code.