Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > best practive with dropdown list controls in user controls

Reply
Thread Tools

best practive with dropdown list controls in user controls

 
 
dma
Guest
Posts: n/a
 
      04-20-2006
Hi all

I have a situation where I have a composite web user control which
centralizes a db lookup. I am having a problem where it seems viewstate is
being voided and it always loses it's selected index. I have properly
wrapped the ispostback, so I am sure it is not getting overwritten that way.
What is most frustrating is that if I move the control out of the web user
control, call it "userlist" and into the web user control that collects
controls into an edit panel, it works like a charm.

Are there some special properties or atttributes I need to put into my list
style user control for it to persist the selection?

Thanks in advance, this is making me nuts, and making a mess of my project
as I create stand alone versions of the nice web user controls that present
common lookup information.

Thanks!

-DMA
 
Reply With Quote
 
 
 
 
Peter Johnson
Guest
Posts: n/a
 
      04-22-2006
Have you looked at overriding your custom controls Viewstate mechanism.
So that you can store the selected index yourself and control this
yourself?

Issues like this can drive you insane sometimes it is better to take
full control of the situation by writing the code yourself, i've had
some nightmares with custom web controls and this sort of thing.

 
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
1 Gridview. Dropdown A is column from database, Dropdown B is column from database, Data in A and B must be from same row. anonymoushamster@gmail.com ASP .Net 2 11-07-2007 12:40 PM
ajax cascading dropdown: second dropdown disabled acadam ASP .Net 0 12-27-2006 10:59 AM
good practive to have write-once setters? Elhanan Java 5 10-03-2006 01:04 PM
bind a dropdown in a column in a datagrid based on the dropdown value selected in another column of the datagrid. vishnu ASP .Net 1 03-25-2006 01:24 PM
Select dropdown box bleeds into Javascript dropdown menu Mike HTML 1 12-18-2003 09:49 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57