Custom controls instance problem on PostBack - two controls, one instance ???

D

Dejan Vesic

Hello.

I created custom control, based on standard DropDownList control.
It is simple extension of the control, with couple of methods added.

My page has two instances of control, let`s say UserDDL1 and
UserDDL2

Now, when page is drawn for the first time, everything works as
expected. But, if I try something like this in PostBack:

UserDDL1.SelectedIndex = 5;
UserDDL2.SelectedIndex = 8;

BOTH controls keep last assigment for .SelectedIndex !!! (8) as if
those controls are reference to the same object instance!

I could not find any problems on code side (C#) or in ASPX page.

Any advice or idea?

Regards,
Dejan Vesic

Platform: VS 2003, .Net Framework 1.1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top