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
496.2K
v2

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

  Print Answers RSS
0 OriginalGriff 540
1 Sergey Alexandrovich Kryukov 432
2 Yogesh Kumar Tyagi 384
3 Prakriti Goyal 280
4 Maciej Los 205
0 OriginalGriff 6,472
1 Sergey Alexandrovich Kryukov 5,404
2 Maciej Los 3,434
3 Peter Leow 3,259
4 DamithSL 2,495


Advertise | Privacy | Mobile
Web03 | 2.8.140721.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