Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

Retaining radio button value in mvc3

<%: Html.RadioButton("rdAS",result.Id,false,new {Class="rdAS"}) %> //It creates around 100 radio buttons as its in foreach loop

Open in new window


I am using paging below the above code(grid)  but when I am changing the page number 1,2,3,4,5 i.e from 1 to 2 page the selected radion button lost its selection as I am doing Ajax post to the server and passing that the page number for paging functionality.

how can I retain this radio buton value.
0
Dinesh Kumar
Asked:
Dinesh Kumar
  • 2
1 Solution
 
käµfm³d 👽Commented:
Pass it as a part of your model.
0
 
Dinesh KumarAuthor Commented:
is there any alternative to this solution? I was trying to avoid it actually.
0
 
Dinesh KumarAuthor Commented:
Thank you.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now