By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,663 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,663 IT Pros & Developers. It's quick & easy.

dropdownlist in a datalist

P: n/a
I have a drop down list inside a data list on a form like this :

<asp:DataList ID="DataList1" runat="server" EnableViewState="False">
<asp:Label ID="lblname" Runat="server" text='<%#
DataBinder.Eval(Container.DataItem,"Name") %>'> </asp:Label>
<asp:DropDownList id="DropDownList1" runat="server" DataTextField="Name"
DataValueField="UID" OnSelectedIndexChanged="CallMySub"

As you can see , the OnSelectedIndexChanged propoerty specifies a
procedure in code behind ..

I have two questions related to this

1. This event did not get fired till i made DataList's
EnableViewState="False". why is that

2. if i populate this datalist with three items, and then change the
selection on dropdownlist it fires the event once first time, then if i
change some other dropdownlist it fires correctly for that dropdownlist
, and then fires again for the previous one

to make it more clear if i have three dropdownlists on the form, and if
i change selection on different one each time it will get fired for all
the previous ones too, starting from latest one
again any help would be appreciated, iam trying to clear up things in my
mind over event firing sequences when controls are embedded in controls ...

Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.