Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Controlling Focus: setting cursor in asp:server controls

Posted on 2005-03-10
2
Medium Priority
?
145 Views
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
0
Comment
Question by:rawdrib
2 Comments
 
LVL 12

Expert Comment

by:S-Twilley
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
0
 
LVL 19

Accepted Solution

by:
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...

document.YourFormName.YourTextBoxname.focus();

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


0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…

581 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