>Thanks so much Naomi, That was very helpful. You seem to know everything.
>Thanks once again.
Hi Sammy,
The sample in the link was a little bit confusing, I think. Here is what I just got working:
#region SQL DataSource Inserting - setting parameters
protected void DataSource_Inserting(object sender, SqlDataSourceCommandEventArgs e)
{
e.Command.Parameters["@PersonType"].Value = ViewState["PersonType"];//this.PersonType ;
}
#endregion
I changed from ControlParameter to just Parameter because I didn't want to keep my combobox to enable state. So, I had to use ViewState to set the combo's value.
I could not find a better way except for changing EnableViewState in code (it also worked).
However, somehow the other way didn't sound too good to me.
If it's not broken, fix it until it is.
My Blog