Click here to Skip to main content
Rate this: bad
good
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" />
                <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
Edited 9-Jan-13 3:09am
497.4K
v2

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 786
1 OriginalGriff 345
2 CPallini 160
3 PIEBALDconsult 150
4 Magic Wonder 131
0 OriginalGriff 5,705
1 Sergey Alexandrovich Kryukov 4,763
2 CPallini 4,570
3 George Jonsson 3,142
4 Gihan Liyanage 2,450


Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2014
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