Solved

get selected index off cascadingdropdown

Posted on 2010-08-18
5
565 Views
Last Modified: 2013-11-08
I have a cascadingdropdown extender to which I need to get the selected index. HOwever, selectedindex is not a property of the cascadingdropdown. It will allow the selectedvalue, but I need the selectedindex.

Please help
0
Comment
Question by:mlg101
  • 3
  • 2
5 Comments
 
LVL 11

Expert Comment

by:ICaldwell
Comment Utility
Are you trying to get this from the VB.Net code, or JavaScript?  You have put this in both AJAX and .Net channels so I am unsure which one you are asking for....  Also if you are talking about JavaScript, please let us know if your using the Microsoft AJAX tools build into .Net or XML tools in JavaScript...

Thanks
0
 
LVL 1

Author Comment

by:mlg101
Comment Utility
Im using the ajax control toolkit with visual basic and .net
0
 
LVL 11

Accepted Solution

by:
ICaldwell earned 500 total points
Comment Utility
As far as I know the selected index is not a property or extended in the framework, you could extend the control to make a custom control for this but its a pain, just curious, why don't you use a dropdownlist?  Why do you need to index, what does that give you over the selected value?
0
 
LVL 1

Author Comment

by:mlg101
Comment Utility
You can't get the value from a dropdownlist when it is tied to the cascadingdropdown extender. If you try, you just get a 0 value. so you have to get it from the cascading dropdown. if I ask it for selectedvalue, then it gives me the index, plus the value, such as "1..text value, and i just need the "1", not the text, so I can reference it in my database as a number only.
0
 
LVL 1

Author Closing Comment

by:mlg101
Comment Utility
I used the dropdownlist. For some reason, it wouldnt work the first time I tried it, but now that you mentioned it, it worked!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now