CheckBOX ASP MVC

Posted by NewmanASPMVC on Stack Overflow See other posts from Stack Overflow or by NewmanASPMVC
Published on 2009-09-22T05:21:25Z Indexed on 2011/01/06 21:53 UTC
Read the original article Hit count: 116

Filed under:
|

Hi i am new to ASP.NET MVC. I am not sure how to deal with Check box or Radio Button to get values when they are clicked. Can any one help me? I am providing a simple code that might help you understand what i meant to be. Please share examples.

<script type="text/javascript" >
     function check(browser)
     {
           document.getElementById("answer").value=browser;
     } </script>

 <form action="">
         <input type="radio" name="browser"
 onclick="check(this.value)"
 value="Internet Explorer"/>Internet
 Explorer<br />
         <input type="radio" name="browser"
 onclick="check(this.value)"
 value="Firefox"/>Firefox<br />
         <input type="radio" name="browser"
 onclick="check(this.value)"
 value="Netscape"/>Netscape<br />
         <input type="radio" name="browser"
 onclick="check(this.value)"
 value="Opera"/>Opera<br />
         <br />
         Your favorite browser is: <input type="text" id="answer"
 size="20"/>  </form>

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about checkbox