Click here to Skip to main content
15,867,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

i want to pass the values , view to controller ...

my code
HTML
<input name="Players[0].Level" id="Players_0__Level" type="radio" checked="checked" value="@t"><label for="Players_0__Level">@t</label>

script
HTML
<script>
    $(document).ready(function () {
        $("#Players_0__Level").on("click", function () {
            location.href = '/SportsDept/Create/' + $(this).find('#Players_0__Level').val();
        });
    });
</script>

i am using "find('#Players_0__Level').val();" but this cod nnot working...
please give a solution for my problem..

Regards
-AR
Posted
Updated 12-Mar-14 23:53pm
v3

1 solution

Use $(this).val() or $('#Players_0__Level').val();
 
Share this answer
 
Comments
An@nd Rajan10 13-Mar-14 6:46am    
this not work
R-a-v-i-k-u-m-a-r 13-Mar-14 6:55am    
Is it throws any error? if not what value will be passed to the action result in controller?
An@nd Rajan10 13-Mar-14 7:14am    
thank you..
how to get the value in controller give an one line example
An@nd Rajan10 13-Mar-14 7:17am    
thank you.. how to get the value in controller give an one line example
R-a-v-i-k-u-m-a-r 13-Mar-14 7:25am    
Public ActionResult Methode(datatype id)
{
}
put a break point and check the value

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

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900