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. Problem with focus when using UpdatePanel and UpdateProgress

Problem with focus when using UpdatePanel and UpdateProgress

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadminhelpquestion
2 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.
  • D Offline
    D Offline
    Dave25600
    wrote on last edited by
    #1

    Hi, I am using AJAX to dynamically produce a DataList according to the input in a TextBox. I am using the 'OnTextChanged' event to achieve this and a problem that occurs is that I will lose focus in my TextBox as soon I begin to type anything. An easy solution for this would be to remove the TextBox from the UpdatePanel but as I am using the UpdateProgress to produce a neat loading gif each time the OnTextChanged event occurs I have to keep the TextBox inside the UpdatePanel right? I have seen a number of examples on the net which suggest using the LastFocus property but have had no luck getting that to work. Am I right in thinking that my problem cannot be solved with the LastFocus property as I also have an UpdateProgess in my code? I am very new to ASP.NET and would highly appreciate any advice with this - my code is fairly large so I'll enclose a snippet of it, that will hopefully make my problem a bit clearer: asp:TextBox ID="txtSearch" OnTextChanged="txtSearch_OnTextChanged" AutoPostBack="true" runat="server">

    Can't find

    D 1 Reply Last reply
    0
    • D Dave25600

      Hi, I am using AJAX to dynamically produce a DataList according to the input in a TextBox. I am using the 'OnTextChanged' event to achieve this and a problem that occurs is that I will lose focus in my TextBox as soon I begin to type anything. An easy solution for this would be to remove the TextBox from the UpdatePanel but as I am using the UpdateProgress to produce a neat loading gif each time the OnTextChanged event occurs I have to keep the TextBox inside the UpdatePanel right? I have seen a number of examples on the net which suggest using the LastFocus property but have had no luck getting that to work. Am I right in thinking that my problem cannot be solved with the LastFocus property as I also have an UpdateProgess in my code? I am very new to ASP.NET and would highly appreciate any advice with this - my code is fairly large so I'll enclose a snippet of it, that will hopefully make my problem a bit clearer: asp:TextBox ID="txtSearch" OnTextChanged="txtSearch_OnTextChanged" AutoPostBack="true" runat="server">

      Can't find

      D Offline
      D Offline
      Dave25600
      wrote on last edited by
      #2

      Sorry I can't figure out how to post html on here, still hope to get some feedback on my problem

      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