Controlling Focus: setting cursor in asp:server controls

Posted on 2005-03-10
Medium Priority
Last Modified: 2010-04-23
Hi, I need to know how to position the cursor in asp:server controls on load and after postbacks in VB.net.  I have had no success finding functions for this purpose such as gotfocus() or setfocus(). Have also tried Javascript to no avail. Just need to know class and functions to access control of the cursor or javascript to provide cursor control. Thank You
Question by:rawdrib
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 12

Expert Comment

ID: 13511097
If by cursor you mean mouse pointer...

I know with WinForms you can set the position like this

        Me.Cursor.Position = New Point(3, 5)

.... however, as for ASP.NET im not sure, but maybe there is something similar within it?

Sorry I can't be much more help but I can't set up ASP.NET apps at the moment
LVL 19

Accepted Solution

arif_eqbal earned 1500 total points
ID: 13513982
well the controls are rendered at the client so the code to manipulate focus must run on client. So you naturally need some scripting language say JavaScript
like this...


you can call this on say the <Body onLoad ...>


Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question