Click here to Skip to main content
14,386,804 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi,
How to remove error provide symbols for controls when changing the radio buttons using Javascript in MVC4

When changing the radio button some controls will be in disable mode and showing error providers so for that we need to remove the error icons and tool tip ,Please expalain the process
Please explain in brief?
Posted
Comments
   
Not clear.
—SA
maheshbodepudi 13-May-13 6:07am
   
When changing a radio button event from yes radio button to no the text boxes will be disabled,but showing error providers,so these should be cleared?

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

MVC and even ASP.NET are pretty much irrelevant here. The event is always handled on the client side (however, you can register script in ASP.NET).

You can use jQuery and its .change() method: http://api.jquery.com/change/[^].

The example shown in this documentation article demonstrates exactly what you are looking for — handling of the selection change in the radio button group.

In the handle, to remove something, and more, use methods from this group: http://api.jquery.com/category/manipulation/[^].

If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[^],
http://learn.jquery.com/[^],
http://api.jquery.com/[^],
http://learn.jquery.com/about-jquery/how-jquery-works/[^].

—SA
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100