471,336 Members | 1,287 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,336 software developers and data experts.

SelectList. How to find value?

Hello,

I created the following SelectList:

var targets = new Dictionary<string, string>();
targets.Add("New Window", "_blank");
targets.Add("SameWindow", "_self");
viewData.Targets = new SelectList(targets, "Value", "Key");

Given a MyVarKey = "_blank" how can I find in the list the Value for
this Key and return it to MyVarValue?

Thanks,
Miguel
Sep 16 '08 #1
0 1045

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

108 posts views Thread by Bryan Olson | last post: by
4 posts views Thread by Arjen | last post: by
2 posts views Thread by Chris Fink | last post: by
67 posts views Thread by PC Datasheet | last post: by
5 posts views Thread by Draw | last post: by
8 posts views Thread by brekehan | last post: by
8 posts views Thread by shapper | last post: by
1 post views Thread by shapper | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.