Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to make textbox mandatory on dropdown change

How to make textbox mandatory on dropdown change

Scheduled Pinned Locked Moved C#
csharpjavatoolshelptutorial
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NK7
    wrote on last edited by
    #1

    Hi I have one dropdown contain status information. Status are 1. Finished 2. Open 3. Progress Also one date textbox. I want to set the text box is editable and mandatory when i select the status as finished in the dropdown. Otherwise it should accept null values(not mandatory) and read only. Can any one help me please. its urgent. It should be in C# or java script Regards K7

    kesavan

    L R 2 Replies Last reply
    0
    • N NK7

      Hi I have one dropdown contain status information. Status are 1. Finished 2. Open 3. Progress Also one date textbox. I want to set the text box is editable and mandatory when i select the status as finished in the dropdown. Otherwise it should accept null values(not mandatory) and read only. Can any one help me please. its urgent. It should be in C# or java script Regards K7

      kesavan

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      NK7 wrote:

      its urgent.

      Not to us! Please read the guidelines.

      1 Reply Last reply
      0
      • N NK7

        Hi I have one dropdown contain status information. Status are 1. Finished 2. Open 3. Progress Also one date textbox. I want to set the text box is editable and mandatory when i select the status as finished in the dropdown. Otherwise it should accept null values(not mandatory) and read only. Can any one help me please. its urgent. It should be in C# or java script Regards K7

        kesavan

        R Offline
        R Offline
        rah_sin
        wrote on last edited by
        #3

        u can put the validation based on the status code of dropdown while submitting the form using javascript.if the status is finished then put check on text box should not be blank.

        rahul

        H 1 Reply Last reply
        0
        • R rah_sin

          u can put the validation based on the status code of dropdown while submitting the form using javascript.if the status is finished then put check on text box should not be blank.

          rahul

          H Offline
          H Offline
          Henry Minute
          wrote on last edited by
          #4

          This is a C# forum. Why would you suggest JavaScript? Unless you have assumed that the OP is writing a Web App, in which case you should point him towards the Web Development forum. :)

          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups