How to do this?

Some said I need to use requiredfieldvalidators for this. Will these affect my other validation with no requiredfieldvalidators?

How to do this?

Some said I need to use requiredfieldvalidators for this. Will these affect my other validation with no requiredfieldvalidators?

Hello AngelicOne,


You can do this easily via server side code

Check out this

if mycheckbox.checked = true then
  if   textbox1.text.trim = string.empty or _
       textbox2.text.trim = string.empty  then

         label1.text = "Enter all the required fields" 'Error message displayed on label
  end if
end if

Mark as solved if it helps you!!!

Oh, i wasn't specific.

I'm using C#, and I need to do it in javascript.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.