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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:48:34+00:00 2026-06-16T21:48:34+00:00

I would like display some Html.DropDownList controls in custom readonly mode. Control should be

  • 0

I would like display some Html.DropDownList controls in custom readonly mode.
Control should be able to open underlaying popup but it shouldn’t save values that selected by user.
For example I have Html.DropDownList control with three values:
Value 1
Value 2
Value 3

Selected item for control “Value 2”

User see combobox control with displayed item “Value 2”.
When user click on control popup with all three values should be opened (as for usual combobox control). In case user choose value different from “Value 2” selected value shouldn’t be saved in control. So, when user click on item “Value 3” from underlying list, control should still display item “Value 2” as selected
Is it possible in any way?

Thank you

  • 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-16T21:48:36+00:00Added an answer on June 16, 2026 at 9:48 pm

    If you are ok. with using jQuery. This should work for you.

    (function () {
        var previous;
        // Grab the initial value in focus event.
        $("select[name=test]").focus(function () {
            previous = this.value;
        // On change event, use previous to set the value of dropdown.
        }).change(function() {
            $("select[name=test]").val(previous);
        });
    })();​
    

    Here is the working example.

    Inspired by another StackOverflow answer.

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

Sidebar

Related Questions

I would like to display some html code if a variable is not empty,
So I have some HTML text that I would like to display in a
I have some HTML script that I would like to make it display in
I would like clearly display some text coded in html, at the moment I
I would like to display other we pages in my mobile webapp, but some
I have some html which I would like to manipulate. Its structure is as
I have some html content stored in a database field. I would like trusted
I have a Service which performs some file I/O. I would like to display
I have some HTML that looks like the following: http://jsfiddle.net/KbqHa/ I would like this
I would like to display some content located in my models in some of

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.