Hi
I am not good in Javascript. If you think I should use Javascript than can you please show me?
Thank You
Javascript would be the easiest but you can also do this in the code behind. Create a boolean variable that will determine if the form can be submitted. Now create an if statement that will tell you if 10 or 13 are selected in the dropdownlist. If they are set your boolean to false. Finally write an if statement that will check the boolean and determine whether or not to proceed with the submit. Here is a quick sample of the code:
bool submit = true;
if(dropdownlist1.SelectedValue == 10 || dropdownlist1.SelectedValue == 13)
{
submit = false;
}
if(submit == false)
{
Label1.Text = "You must enter text in the textbox";
//you could also use a javascript popup window here to inform the user.
}
else
{
//submit the form with an insert proc or something.
}
Nathan