.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 3rd, 2003, 09:02 PM
dbernett dbernett is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 4 dbernett User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ViewState for User Controls??

I just wrote a User Control that populates a drop Down from a Database.<br><br>I have enableviewstate=true for BOTH the user control AND the page<br>I drag the user control on. <br><br>PostBack is also set to true on the User control.<br><br>Every time an item is selected from the drop down, the list keeps growing<br>with duplicates, i.e. 8 items to 16 to 32 etc, etc.<br><br>If I turn OFF enableview state for either the User Control OR the Form the<br>control is on, Items DO NOT duplicate BUT the selection does not stay after<br>post back.<br><br>I'm sure the solution is easy Any help would be greatly appreciated.<br><br>David Bernett

Reply With Quote
  #2  
Old February 3rd, 2003, 09:06 PM
dbernett dbernett is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 4 dbernett User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm such an Idiot..................<br><br>By wrapping <br><br>If Page.IsPostBack = False Around the <br>user control routine fixed the problem!<br><br>Sorry for the post<br><br>David Bernett

Reply With Quote
  #3  
Old February 4th, 2003, 12:31 AM
Andrew Andrew is offline
dotNetBB Forums Developer
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 265 Andrew User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to Andrew Send a message via AIM to Andrew Send a message via Yahoo to Andrew
No need to appologize for the post, chances are there are at least 100 other people out there with the same issue.<p> </p><p><hr size="1" width="50%" align="left" />dotNetBB Forum Developer<br><b><i>Building A Better Community, One Post At A Time</i></b><br><a href="http://www.dotnetbb.com" target="_blank">www.dotnetbb.com</a></p>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > ViewState for User Controls??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT