Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Custom controls instance problem on PostBack - two controls, one instance ???

Reply
Thread Tools

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

 
 
Dejan Vesic
Guest
Posts: n/a
 
      08-20-2003
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 !!! ( 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
databound custom controls vs composite databound custom controls rodchar ASP .Net 0 11-26-2007 03:51 PM
stop postback in postback events for server controls ?? Wael_Bakr ASP .Net Web Controls 0 11-30-2005 08:06 AM
Custom Control : One custom property to array of controls anon ASP .Net Web Controls 0 01-15-2005 11:32 AM
effecting postback without auto postback controls Psych971 ASP .Net 5 12-17-2004 08:53 PM
Problem: Custom control receives postback events for other controls Lamont Adams ASP .Net 1 09-10-2004 09:02 PM



Advertisments