Hello,
I have a combobox that takes input for the RadUpload. The combo box loads with -- Select Value-- in it but when no selectin is made i get a NullReferenceException occurred. at this line.
string DBCreativeName = RCBXCreative.SelectedItem.Value;
so I tried to use an if and try catch to fix this
string DBCreativeName = RCBXCreative.SelectedItem.Value;
try
{
if (Convert.ToBoolean(DBCreativeName = ""))
{
lblstatupload2.Text = "You need to select a creative";
}
}
catch (NullReferenceException)
{
lblstatupload2.Text = " you need to enter a creative";
}
this didn't work either. Can someone advise me on what is the correct way to fix this.
Thanks,
Yusef