Results 1 to 2 of 2

Thread: Event Not Firing !!!!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2002
    Location
    fgh
    Posts
    332

    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();

    }
    gh

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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
  •  



Click Here to Expand Forum to Full Width