Click here to Skip to main content
12,953,700 members (50,994 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
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" />
                <ComboBox.SelectedIndex>0</ComboBox.SelectedIndex>
            </ComboBox>

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.

Reagrds
Srinivas
Posted 9-Jan-13 2:24am
Updated 9-Jan-13 3:09am
v2

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
OriginalGriff 6,429
CHill60 3,490
Maciej Los 3,103
ppolymorphe 2,020
Jochen Arndt 1,975


Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2017
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