How to add more than one value in a Same datafield
I have two comboboxes One MonthCombobox(cmbMonth) and YearCombobox(cmbYear) and the Table Name is Calender in that i have one datafield that is version. my Question is How to add these two combobox Selected values in one datafield of Version.

Suthish NairRank #92 · 22.8K reputationPosted Mar 9, 2011, 1:15 AM EST
Krishna GaradRank #191 · 12.8K reputationPosted Mar 9, 2011, 1:15 AM EST
string value=cmbMonth.SelectedItem.Text.ToString()+"-"+cmbYear.SelectedItem.
Text.ToString();
noe insert this value in that version field.
anitha r20 reputationPosted Mar 9, 2011, 1:44 AM EST
I tried Your Given Code it shows error as SilverlightUnhandledError...am using the following code for add datas to database
private void btnSave_Click(object sender, RoutedEventArgs e)
{
MAGAZINE magazine = new MAGAZINE()
magazine.MAG_ID = Int32.Parse(txtMagazineId.Text);
//magazine.MAG_EDITION = textBox1.Text;
magazine.MAG_EDITION = cmbMonth.SelectedItem.ToString() + "-" + cmbYear.SelectedItem.ToString();
magazine.MAG_DESCRIPTION = txtDescription.Text;
magazine.MAG_UPBY = Int32.Parse(txtUpdatedby.Text);
magazine.MAG_UPDATE = DateTime.Parse(txtupdatedate.Text);
magazine.MAG_FILE =System.Text.Encoding.UTF8.GetBytes(txtBook.Text);
magazine.MAG_IMAGE = System.Text.Encoding.UTF8.GetBytes(txtCover.Text);
magazine.MAG_ACTIVE = true;
objectcontext.MAGAZINEs.Add(magazine);
objectcontext.SubmitChanges(SubmitOperation_Callback,null);
clearform();
}
In this am using this( magazine.MAG_EDITION = cmbMonth.SelectedItem.ToString() + "-" + cmbYear.SelectedItem.ToString();) for add combobox
Krishna GaradRank #191 · 12.8K reputationPosted Mar 9, 2011, 2:08 AM EST
magazine.MAG_EDITION = cmbMonth.SelectedItem.ToString() + "-" + cmbYear.SelectedItem.ToString();
replace it like
magazine.MAG_EDITION = cmbMonth.SelectedText.ToString() + "-" + cmbYear.SelectedText.ToString();
But I think it's not compiletime error it's the runtime error only.
Suthish NairRank #92 · 22.8K reputationPosted Mar 9, 2011, 3:40 AM EST
anitha r20 reputationPosted Mar 9, 2011, 9:12 PM EST
anitha r20 reputationPosted Mar 9, 2011, 9:15 PM EST
anitha r20 reputationPosted Mar 11, 2011, 12:55 AM EST