Set focus on a element inside a repeater control


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Set focus on a element inside a repeater control

  1. #1
    Join Date
    May 2005
    Location
    Germany, South West
    Posts
    1

    Set focus on a element inside a repeater control

    Hello to all,
    maybe someone can help me.
    I use a repeater control which also contains other elements like Image Buttons. Imagine for example an article list with a button to buy. When the user clicks on it the server code does something, the information changes and the user see it on the browser. But the focus is now lost, so maybe the user have to scroll down to the article he was looking.
    I know, that I can use Javascript to set the focus, using the id of the control. But I dont know how to realize it, because ASP.NET is automatically creating the controls in the repeater.
    I tryed to set the id of the control inside the ItemDataBound - event of the Repeater. I got no error during executing, but when I looked at the source code of the Webpage I missed the given ID.

    Has anyone an idea?
    Thank you very much.
    Greetings, Wolfgang

  2. #2
    Join Date
    Feb 2004
    Posts
    126
    Try doing it in the ItemDataBound which you said you have done..
    Try posting some code how you went about it you must be missing something..
    Patrick

Similar Threads

  1. Replies: 2
    Last Post: 08-29-2002, 05:23 PM
  2. Here's how to set focus to an asp:textbox
    By Russell Jones in forum ASP.NET
    Replies: 1
    Last Post: 06-19-2002, 06:11 PM
  3. Replies: 5
    Last Post: 12-06-2001, 02:35 PM
  4. Where do you enter client-side code in vs.net ide?
    By mark erickson in forum ASP.NET
    Replies: 8
    Last Post: 11-30-2001, 12:31 PM
  5. Replies: 1
    Last Post: 12-23-2000, 09:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center