Hello,


Event Not firing ??????????????


<asp: DataList ID="dlBrandList" runat="server" Width="484px" CellPadding="3" CellSpacing="1" Height="632px" BackColor="Silver" OnSelectedIndexChanged = "dlBrandList_SelectedIndexChanged" OnItemDataBound = "dlBrandList_ItemDataBound">



protected void dlBrandList_ItemDataBound(object sender, DataListItemEventArgs e)
{


if (e.Item.ItemIndex != -1)
e.Item.Attributes[

"onclick"] = Page.ClientScript.GetPostBackClientHyperlink(this.dlBrandList, "Select$" + e.Item.ItemIndex);
}




protected void dlBrandList_SelectedIndexChanged(object sender, EventArgs e)
{


if (dlBrandList.SelectedIndex >= 0)
{

Session[

"ShowSection"] = "rlProductResults";

Label lblBrand = (Label)dlBrandList.SelectedItem.FindControl("lblBrandId");
Session[

"BrandIdonly"] = lblBrand.Text;
}

}


the above event is not firing, any idea ?

I have a datalist (tag above pasted) which need to fire OnSelectedIndexChanged event ...


Additional References :

protected void Page_Load(System.Object sender, System.EventArgs e)
{


try
{


Session["UserId"] = "abc";
Session[

"DevKey"] = "123";
Session[

"PriceType"] = "Retail";

if (!IsPostBack)
{

Session[

"ShowSection"] = "rlLineList";
bindDataList();

}



}



public void bindDataList()
{


SearchService proxy = new SearchService();

Credentials credential = new Credentials();
credential.UserID =

new Guid(Session["UserId"].ToString());
credential.DevKey =

new Guid(Session["DevKey"].ToString());
proxy.ReplinkCredentialsValue = credential;

dlBrandList.DataSource = proxy.GetBrandLineList();

dlBrandList.DataBind();

}