开发者

load a view with jquery in MVC 3

I work with MVC 3. In a view I have 2 radio buttons. When I click on one of the two radiobutt开发者_C百科ons then I try with jquery to load a view. But it doesn's work.

I am completley new to MVC and jQuery.

Here is my code:

  $('radioButtonFor#dutch').click(function () {
      load('/MyController/MyView', parameterForTheView)
  });

And here is one of the radio buttons:

             @Html.RadioButtonFor(m => m.IsBelg, false, new { id = "dutch" })

Please help me!

Ronald


Your jquery reference to the Radio Button should read as follows:

  $("#dutch").click(function () {
      load('/MyController/MyView', parameterForTheView)   
  });


is load method your own method? jquery should look like

$("#container").load(...);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜