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 can you add a click event in the text box, C# , asp.net

How can you add a click event in the text box, C# , asp.net

Scheduled Pinned Locked Moved C#
csharpasp-netquestion
3 Posts 3 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.
  • E Offline
    E Offline
    emmadahmad
    wrote on last edited by
    #1

    I want a dropdown menu to be visible only when i click on the text box. Is this possible? I can find no such click event in asp.net

    P B 2 Replies Last reply
    0
    • E emmadahmad

      I want a dropdown menu to be visible only when i click on the text box. Is this possible? I can find no such click event in asp.net

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Think about this for a while and consider the postback model. You'd either have to postback to the server every time you clicked in the textbox which would cause the whole page to be refreshed, which would be a real pain for the user, or you have to find an alternative mechanism. Is this giving you a hint? Think of javascript - and it's not a click event you want to consider, it's the focus event.

      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

      My blog | My articles | MoXAML PowerToys | Onyx

      1 Reply Last reply
      0
      • E emmadahmad

        I want a dropdown menu to be visible only when i click on the text box. Is this possible? I can find no such click event in asp.net

        B Offline
        B Offline
        brunoseixas
        wrote on last edited by
        #3

        YOUR_TEXTBOX_ID.Attributes.Add("onclick","Visible(true);"); function Visible(isVisible) { $get('your_dropdown_clientid').visible = isVisible; }

        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