Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
Problem using asp:RequiredFieldValidator for ig:WebDropDown
posted

I have a ig:WebDropDown which is having the starting value as 'Select' as below 

<ig:WebDropDown ID="ddlTeam" runat="server" Width="260px" DisplayMode="DropDownList">  

</ig:WebDropDown>

 

I used RequiredFieldValidator for the control as below, 

 

<

 

 

  asp:RequiredFieldValidator ID="rfvEmployee" runat="server" InitialValue="Select"  

 

 

ErrorMessage="Select a Team" ControlToValidate="ddlTeam">

 

The problem is when i have value as 'Select' in WebDropDown and click on some button,

the validation fired correctly and after selecting some other value other than 'Select' in WebDropDown

and the Validation Message is not going off, still its showing as 'Select a Team'

What i came to know is only when some post back is happening then only the Validation is working

fine, becoz when i set AutoPostBack = true for WebDropDown its working.

 

But i dont want to set AutoPostBack = true.

So, can you provide a solution for this ASAP, how to use RequiredFieldValidator for ig:WebDropDown without using

AutoPostBack to true.

 

---------------------------

Thanks in Advance.

Pavan. 

Parents Reply Children