|
-
Jan 17th, 2008, 03:30 AM
#1
Thread Starter
Hyperactive Member
[2005] Working with User Controls
Plz, i created a user control with three dropdownlist controls and a button. The user will select a combinations of options from these three dropdownlist control. The problem now is that:no matter the user's selection,when i try retrieving the selectedIndex of each of the three dropdownlist controls,it returns the first item on each of them
Nobody is smarter than all of us!
-
Jan 17th, 2008, 04:57 AM
#2
Re: [2005] Working with User Controls
Are you setting its AutoPostBack to True?
Could you please show us your code?
-
Jan 17th, 2008, 05:13 AM
#3
Thread Starter
Hyperactive Member
Re: [2005] Working with User Controls
 Originally Posted by Harsh Gupta
Are you setting its AutoPostBack to True?
Could you please show us your code?
The AutoPostBack property for the dropdownlists are set to false,the user will only need to select his choice and the button on the user control will do the postBack( i will retrieve the selectedIndex of the dropdownlists in the button's click event)
Nobody is smarter than all of us!
-
Jan 17th, 2008, 08:17 AM
#4
Re: [2005] Working with User Controls
Have you done a Page.IsPostBack check to make sure that the control only populates the first time the page is loaded and not on subsequent postbacks?
-
Jan 17th, 2008, 09:13 AM
#5
Thread Starter
Hyperactive Member
Re: [2005] Working with User Controls
 Originally Posted by mendhak
Have you done a Page.IsPostBack check to make sure that the control only populates the first time the page is loaded and not on subsequent postbacks?
Plz,dont mind me,u got it right!.The first implmentation of the user control worked well but had its dropdownlist controls' autoPostback property set to True(also i was reloading the list based on some specific options).I later made some changes to prevent the the dropdownlist from posting back to the server (and loading all possible items on page_Load event) but 4got to coment out the reloading of the dropdownlist items. I was in a rush but thanx 4 ur corrections.Plz let me get back to my work
Nobody is smarter than all of us!
-
Jan 17th, 2008, 09:20 AM
#6
Thread Starter
Hyperactive Member
Re: [2005] Working with User Controls
plz,sorry, i 4got 2 ask, after placing the user control on my page, i want some kind of properties other "standard" asp.net controls have. properties such as tabIndex,toolTip, height etc for the user control. I guess i hav 2 inherit from the base clase (userControl? )
Nobody is smarter than all of us!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|