|
-
Mar 27th, 2008, 07:09 PM
#1
Thread Starter
Hyperactive Member
Event Not Firing !!!!
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();
}
-
Mar 28th, 2008, 02:40 PM
#2
Re: Event Not Firing !!!!
How is the index of the datalist being changed?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|