Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8673983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:35:37+00:00 2026-06-12T19:35:37+00:00

Having a bizarre issue that I’m hoping people can shed some like on. When

  • 0

Having a bizarre issue that I’m hoping people can shed some like on.
When I’ve been making forms with check boxes and radio buttons in my jQuery Mobile MVC 4 project, if I use Razor syntax to spit out the controls according to the view model e.g. @Html.RadioButtonFor etc instead of just writing the standard input type=”radio”, jQuery Mobile doesn’t apply the styles to the elements. Screen shots and code differences included. Is this something to do with the way the controls are being rendered? Happens in both Views and Partial Views.

I have changed just the first set of radio buttons here to demonstrate the point. If I change the whole form to Razor HTML helpers, I would get the same across all of the controls.

Non-Razor:
Non Razor
Razor:
Razor

Non-Razor code:

<fieldset data-role="controlgroup" data-type="vertical" class="recurrencyArea">
                                <legend></legend>
                                <input type="radio" data-theme="b" name="Period" id="Daily" value="Daily" checked="checked" />
                                <label for="Daily">Daily</label>

                                <input type="radio" data-theme="b" name="Period" id="Weekly" value="Weekly" />
                                <label for="Weekly">Weekly</label>

                                <input type="radio" data-theme="b" name="Period" id="Monthly" value="Monthly" />
                                <label for="Monthly">Monthly</label>
                            </fieldset>

Razor code:

<fieldset data-role="controlgroup" data-type="vertical" class="recurrencyArea">
                                <legend></legend>
                                @Html.LabelFor(x=>x.Period, "Daily")
                                @Html.RadioButtonFor(x => x.Period, "Daily", new { data_theme = "b", @Checked = "checked", id = "Daily"  })

                                @Html.LabelFor(x=>x.Period, "Weekly")
                                @Html.RadioButtonFor(x => x.Period, "Weekly", new { data_theme = "b", @Checked = "checked", id = "Weekly"  })

                                @Html.LabelFor(x=>x.Period, "Monthly")
                                @Html.RadioButtonFor(x => x.Period, "Monthly", new { data_theme = "b", @Checked = "checked", id = "Monthly"  })
                            </fieldset>

Is the razor html being generated after the jquery mobile scripts have run over the page?

Anybody with any helpful ideas/or indeed anyone who can spot any stupid mistakes would be a hero!

Many thanks,
Christian

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:35:38+00:00Added an answer on June 12, 2026 at 7:35 pm

    I’m not too familiar with jquerymobile, but the on glitch i can see here, is that for the html code you have labels that look like this:

    <label for="Daily">Daily</label>
    

    while the razor code will output the labels like this:

    <label for="Period">Daily</label>
    

    The “for” attribute is wrong for your sceanrio in the razor code, maybe jquery mobile is sensitive to that?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a bizarre issue that I haven't seen before and I'm thinking it
I've been having a very bizarre issue with the jQuery Confirm code on my
Probably I'm being stupid and overlooking something, but I am having a bizarre issue
I am having a bizarre issue. In the spirit of trying to write DRYer,
This is bizarre, I was wondering if anyone could shed some light on why
Im building an application and Im having a bizarre issue where sometimes an sql
I'm having bizarre behavior with stringstreams. It seems that if I create two stringstreams,
Im having some bizarre results in regards to the php date() function. Basically Im
Having some problems initialising a google map using geocoding. First issue is with any
I'm having a bizarre problem with XNA. I've been going through the following tutorial:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.