A constant value is expected
Hi everyone,
I am trying to display some info in a drop down list. I am taking this info from an array. The problem is when I want to read each drop down list's value, I have to assign it programatically so I chose to use switch function like this:
protected void ddl1_SelectedIndexChanged(object sender, EventArgs e)
{
string category = ((DropDownList)CreateUserWizard1.CreateUserStep.Co ntentTemplateContainer.FindControl("ddl2")).Select edItem.Value.ToString();
switch (category)
{
case category = "January":
Response.Write(category);
break;
}
}
and get this error: A constant value is expected. Please help:(
|