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. Web Development
  3. ASP.NET
  4. The TextChanged event does not fire.Please help!

The TextChanged event does not fire.Please help!

Scheduled Pinned Locked Moved ASP.NET
helptutorialquestion
3 Posts 1 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.
  • L Offline
    L Offline
    largs
    wrote on last edited by
    #1

    I have a simple web form with a textbox and a label.I'd like when i enter (or delete )text of the textbox the label will display the current length of the text in the textbox.Here is my code: private void TextBox1_TextChanged(object sender, System.EventArgs e) { Label1.Text=TextBox1.Text.Length.ToString(); } I use the TextChanged event of the TextBox control.I also set the EnableViewState and AutoPostBack property of textbox to true but nothing happened when i enter text to the textbox.However the previous code worked well in Window Form.How to fire this event in Web form?

    L 1 Reply Last reply
    0
    • L largs

      I have a simple web form with a textbox and a label.I'd like when i enter (or delete )text of the textbox the label will display the current length of the text in the textbox.Here is my code: private void TextBox1_TextChanged(object sender, System.EventArgs e) { Label1.Text=TextBox1.Text.Length.ToString(); } I use the TextChanged event of the TextBox control.I also set the EnableViewState and AutoPostBack property of textbox to true but nothing happened when i enter text to the textbox.However the previous code worked well in Window Form.How to fire this event in Web form?

      L Offline
      L Offline
      largs
      wrote on last edited by
      #2

      It worked but the event just fire when i left the textbox but I'd like it fire when i type the text.Can Ajax resolve this problem?Thanks for reading

      L 1 Reply Last reply
      0
      • L largs

        It worked but the event just fire when i left the textbox but I'd like it fire when i type the text.Can Ajax resolve this problem?Thanks for reading

        L Offline
        L Offline
        largs
        wrote on last edited by
        #3

        No one help me?I think it's not a difficult matter.Please help me!

        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