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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:09:06+00:00 2026-05-16T00:09:06+00:00

I have the following html in my ASP.NET form. It represents a dropdown menu

  • 0

I have the following html in my ASP.NET form. It represents a dropdown menu to let the user choose his budget. When the user selects a value on the list. A jquery code copies the selected value in the ProjectBudget hidden field so it can be submited through the form.

<p><label>Project budget*</label></p>
<a href="#" class="SelectionDropdownMenu">Choose budget value</a>
<input id="ProjectBudget" class="inputDropdownValue" runat="server" type="hidden" />
<ul class="DropdownMenu">
    <li><a href="#">5 000 $ or less</a></li>
    <li><a href="#">5 000 $ - 10 000 $</a></li>
    <li><a href="#">10 000 $ - 25 000 $</a></li>
    <li><a href="#">25 000 $ - 50 000 $</a></li>
    <li><a href="#">50 000 $ - 100 000 $</a></li>
    <li><a href="#">100 000 $ or more</a></li>
    <li><a href="#">N.A.</a></li>
</ul>

This solution worked well for me in the past but I didn’t have to make any validation on the field and using a unordered list gives more flexibility to our web designers over a DropDownList.

However I want to add ASP.NET validation to have the budget selection mandatory.

Besides using a DropDownList and use a RequiredFieldValidator. What are my options?

  • 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-16T00:09:06+00:00Added an answer on May 16, 2026 at 12:09 am

    It looks like you have a dependency on javascript, so why not use a standard DropDownList with the jquery ui selectmenu plugin or something similar which can give you the markup you are looking for and manages the <select> element behind the scenes. Then you can use the RequiredFieldValidator and have the markup you want for design flexibility.

    As an added bonus, you kick the js dependency (at least for this item).

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

Sidebar

Related Questions

I have master page that contains the following asp.net form tag <form id=CommerceMasterForm runat=server>
I have the following jquery in my ASP.NET regular pages <html xmlns=http://www.w3.org/1999/xhtml> <head runat=server>
I have the following html <div id=menu> <ul class=horizMenu> <li id=active><a href=# id=current>About</a></li> <li><a
Hello is it possible to have an ASP.NET MVC form that uses the routes
Hallo, I have following jquery code for calling ASP.NET MVC controller method that is
I have the following asp.net mvc2 template: <%@ Control Language=C# Inherits=System.Web.Mvc.ViewUserControl<ncontinuity2.core.dto.TrainingLookUpContainer> %> <%= Html.EditorFor(x
I have an ASP.NET web form. This web form has an event handler that
In my ASP.NET MVC application I have the following GET input field: <% using
I'm using an checkbox on an ASP.NET MVC form like so: <%=Html.CheckBox(AgreeToRules, Model.AgreeToRules)%> The
i have an asp.net mvc page and i want to have a dropdown list

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.