|
-
May 17th, 2005, 08:19 AM
#1
Getting the value from a dropdownlist [Abandoned]
Here's the scenario. I have page with a dropdownlist on it. In the save button's click event, I am retrieving the value like this:
VB Code:
strDesig = Me.listDesignation.Items(Me.listDesignation.SelectedIndex).Value
Now this works.
However, when I set the EnableViewState property of the page to false, the code errors out at the above line, showing me that .SelectedIndex is -1.
This is despite the control's EnableViewState property being set to True.
Any clues?
Last edited by mendhak; May 18th, 2005 at 12:41 AM.
-
May 17th, 2005, 09:19 AM
#2
Frenzied Member
Re: Getting the value from a dropdownlist
I ain't 100% sure but check the HTML source code to make sure there is a viewstate hidden form input. I'm not sure if turning off viewstate for the page forces viewstate not to work for everything?
DJ
If I have been helpful please rate my post. If I haven't tell me!
-
May 17th, 2005, 09:27 AM
#3
Re: Getting the value from a dropdownlist
About to leave now, I'll look at your answer later. Thanks for replying though.
-
May 17th, 2005, 11:52 PM
#4
Frenzied Member
Re: Getting the value from a dropdownlist
DropDownList.AutoPostBack = True; ?
-
May 18th, 2005, 12:40 AM
#5
Re: Getting the value from a dropdownlist
This problem has been abandoned, thanks for replying though.
-
May 18th, 2005, 12:58 AM
#6
Frenzied Member
Re: Getting the value from a dropdownlist [Abandoned]
This problem has been abandoned
That is a bad attitude....never abondon problems. Solve it...
Sorry....Just had to get you back!!
-
May 18th, 2005, 12:19 PM
#7
Re: Getting the value from a dropdownlist [Abandoned]
It somehow solved itself, so I abandoned it. I'm now tearing my hair out over the IE treeview control. A post to come on it soon, perhaps...
-
May 18th, 2005, 07:49 PM
#8
Frenzied Member
Re: Getting the value from a dropdownlist [Abandoned]
Hi,
Not that I'm ANY expert on that (IE TreeView), but let me know if you get stuck.
Reason I say so is that now I'm testing this WebControl Treeview (at MS) that is nearly the same as the IE webcontrols and I would lke to hear where ppl get stuck.
-
May 18th, 2005, 08:57 PM
#9
Re: Getting the value from a dropdownlist [Abandoned]
That's great! I'll start a new thread when I get into work, and PM you.
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
|