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 setting focus dynamically

Problem setting focus dynamically

Scheduled Pinned Locked Moved ASP.NET
helpjavatoolsquestionannouncement
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.
  • A Offline
    A Offline
    Arindam Datta
    wrote on last edited by
    #1

    Hi,whenever I am using update panel,i can not dynamically set focus to the control I want to.Should I use any Java Script?Can anybody help me out???Thanx in advance...

    E G 2 Replies Last reply
    0
    • A Arindam Datta

      Hi,whenever I am using update panel,i can not dynamically set focus to the control I want to.Should I use any Java Script?Can anybody help me out???Thanx in advance...

      E Offline
      E Offline
      eyeseetee
      wrote on last edited by
      #2

      http://www.velocityreviews.com/forums/t369478-set-focus-to-a-control-inside-a-updatepanel-in-atlas.html http://forums.asp.net/t/1027015.aspx

      1 Reply Last reply
      0
      • A Arindam Datta

        Hi,whenever I am using update panel,i can not dynamically set focus to the control I want to.Should I use any Java Script?Can anybody help me out???Thanx in advance...

        G Offline
        G Offline
        gurdeep_677
        wrote on last edited by
        #3

        yes dear u can use javascript when u use UpdatePanel in update panel some time document.getelementById("") is working properly. U can use the javascript with ClientControl Id. Simple add attibute in your codebehind file and passes ClientId control to the javascript like below; .cs Button1.Attribute.Add("onclick","javascript : return JSscript("+TextBox1.ClientID+");"); on javascripting function JSscript(ctrlID) { ctrlID.focus(); return false; } I hope it will work for u ...

        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