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 254487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:51:02+00:00 2026-05-11T21:51:02+00:00

I am working on MVC with C#. I have 2 radio buttons. On selecting

  • 0

I am working on MVC with C#.

I have 2 radio buttons. On selecting first radio button, a textbox will be shown which allows to enter date values.
<%= Html.TextBox(“ReceivedDate”)%>

on selecting the second radio button, the textbox gets hidden.

For the first time, when i select first radio button and entered date and clicked Next to navigate to next page and came back to this page again and clicked second radio button and clicked Next to continue and again i came back to this page and without changing any option click continue, its not allowing to navigate and shows an error.

      A value is required.

Which means the ModelState validating the hidden controls also.

Please suggest how to control it

  • 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-11T21:51:02+00:00Added an answer on May 11, 2026 at 9:51 pm

    Instead of hiding it remove the element from the DOM and reinsert it if the first item is selected again. Another way would be to change the name of the input control to something else (a key not present in your model data) when the first item is not selected.

    Validating hidden input types is a good thing, i often use them to synchronize data from complex controls (like a treeview with checkboxes). An input type with a hidden css style doesn’t make it not submit with the form it belongs too.

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

Sidebar

Related Questions

I am working in Asp.net MVC and have a peculiar requirement for which I
I have a mvc view made up of a matrix of radio buttons. Each
I have been trying to get simple YES/NO radio buttons list working but facing
I am working on MVC appliction .I have a masterpage which is calling external
I have a simple requirement where I have 2 date values which I will
I'm working through a previous webforms application to convert it to MVC and have
I have a MVC 4 project I am currently working on and need some
I have an MVC application that is using MEF for the controllers, all working
I'm working with a MVC modular structure, kind of like you can have with
I have a working copy of asp.net mvc site locally. I just uploaded the

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.