First of all your
Session["MenuValue"]
is not changed once you select the combobox. There are two solution for your problem.
1. If you don't want to change your Session variable then change your code like this and keep the rest of your code.
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string MenuValue = Session["MenuValue"].ToString();
if (MenuValue == null)
{
HatStyleComboBox.SelectedValue = "1";
}
else
{
HatStyleComboBox.SelectedValue = MenuValue;
}
HatComboImageChange();
DescriptionChange();
SizeChange();
}
}
protected void HatStyleComboBox_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
{
HatComboImageChange();
DescriptionChange();
SizeChange();
}
2. If you want to change your Session variable, then assign value under ComboBox SelectedIndexChanged
protected void HatStyleComboBox_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
{
Session["MenuValue"] = HatStyleComboBox.SelectedValue;
HatComboImageChange();
DescriptionChange();
SizeChange();
}
I hope this will help you well.