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

  • Home
  • SEARCH
  • 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 7161257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:32:11+00:00 2026-05-28T13:32:11+00:00

<input id=@question.QuestionId type=radio value=@question.QuestionDescription name=@string.Format(name_{0}, question.Group) checked=@question.IsSelectedchecked:false /> @question.QuestionDescription Depending on the question.IsSelected value

  • 0
<input id="@question.QuestionId" type="radio" value="@question.QuestionDescription" name="@string.Format("name_{0}", question.Group)" checked=@question.IsSelected"checked":false /> @question.QuestionDescription

Depending on the question.IsSelected value the checkbox should be selected or not selected.

But regardless of true or false of the IsSelected property Radiobutton is always checked. Can you point where the error in checked attribute please

  • 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-05-28T13:32:12+00:00Added an answer on May 28, 2026 at 1:32 pm

    If you give it anything for the checked attribute it will be set to checked. I would optionally add the entire checked='checked' value based on the IsSelected property, omitting it when the value is false.

    <input id="@question.QuestionId" type="radio" value="@question.QuestionDescription" name="@string.Format("name_{0}", question.Group)" @(question.IsSelected?"checked='checked'":"") /> @question.QuestionDescription
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Multiple groups or radio buttons <h1>Question 1</h1> <input type=radio name=radio1 value=false /> <input type=radio
Question 1: Given <input type=radio name=foo value=1 /> <input type=radio name=foo value=2 /> <input
I have a input type radio with it's value. <input type=radio name=myradio id=radio1 value=someValue
I toggle a div using something like this - <input type=radio name=myRadio value=myDiv_1 />MyDiv
This is my jQuery script: $(input[type=radio]:checked).live(click, function() { $(this).attr(checked,false); }); I want to make
Base on this question radio selected I use this way <input type=radio class=fp value=q
My HTML <div class=questions> <p>Q1</p> <label><input name=q1 id=q1-a type=radio />Q1 ans A</label> <label><input name=q1
This is my element with a custom attribute: <input type=radio status=B name=OPT_PARENT/> My script:
HTML Javascript question to get the selected value of a input-select I can use
I am trying to make a radio input checked. Neither of the following works:

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.