Click here to Skip to main content
11,932,681 members (61,011 online)
Rate this:
Please Sign up or sign in to vote.
See more: Silverlight5
i am creating one property in entity class like below
public class Myclass
private string _Selecteditem;
public string SelectedItem
get{return _Selecteditem;}
set{_Seleteditem = value;
in xaml page i am binding Combobox like below
<ComboBox Name="cmbCountry" Grid.Column="14" Grid.Row="0" Width="150" SelectedItem="{Binding SelectedCountry,Mode=TwoWay}" >
                <ComboBoxItem Tag="--Select--" Content="--Select--"/>
                <ComboBoxItem Tag="US" Content="US" />
                <ComboBoxItem Tag="CA" Content="CA" />
i want add this selected item to querystring in Model class, i am trying like below
Myclass myclass = new MyClass();
QueryString.Add("SeletedItem", Convert.ToString(myclass.SelectedItem.Value));
here i am getting SelectedItem value as System.Web.ComboItem, but i want if i select 'US' as dropdown i need to get 'US'. how to get the value please can help me.

Posted 9-Jan-13 3:24am
Edited 9-Jan-13 4:09am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100