.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 6th, 2003, 10:39 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
User Controls and passing values

I have spent many many hours researching and looking through a dozen books but I can not seem to find an example nor get this to work.<br><br>I simply have a User Control that builds a drop down of facilities. (Postback set to true)<br><br>I dropped this user control onto my web form of course. <br><br>When a user selects from the drop down I can NOT retrieve the selected value <br>in my Web page. Because the Page_Load event fires first before the User Control<br>does. Because of this. I get the PREVIOUS selected value instead of the one just<br>selected.<br><br><br>Put another way....<br>The SelectedIndexChanged Sub (in user control) always runs AFTER the page load of the Form, so I always get the last value and NOT the one just selected.<br><br><br>Can anybody give me a link of a working user control example that handles postbacks<br>and retreiving the immediate value? Has anybody ever run into this problem before?<br><br>Thank you.<br><br>David Bernett

Reply With Quote
  #2  
Old August 5th, 2003, 01:04 PM
LeonJollans LeonJollans is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 27 LeonJollans User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Create a public property on your UserControl which loops through the embedded list and returns the first ListItem with Selected = true. Then work with that.


hth
Leon

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > User Controls and passing values


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 5 hosted by Hostway
Stay green...Green IT