473,503 Members | 9,912 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to sezt textbox-focus?

hello everbody,

does anyone know, its possible to set the focus of a textbox?

if i have an textbox with few lines of text, and i refresh the site, the
focus of textbox will move to the beginning...

but i want to let the focus of the end of the text.....
some suggestions?

best regards

rasta

----------------------------------------
HangulHanjaFastConversion-Eigenschaft

True if Microsoft Word automatically converts a word with
only one suggestion during conversion between hangul
and hanja. Read/write Boolean.
----------------------------------------

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
2 1102

If you want to do it in code use:
this.RegisterStartupScript("FocusedControl",
"<script
language='javascript'>\r\ndocument.getElementById( 'txtSomeControl').focus();
\r\n</script>\r\n");

Otherwise you can hook the above code direclty in the HTML either before the
end of the form tag or by hooking the form's onload() event..

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/webblog/
----------------------------------
Making waves on the Web
"RASTA" <th***********@hannover-NOSPAM-leasing.de> wrote in message
news:OR*************@tk2msftngp13.phx.gbl...
hello everbody,

does anyone know, its possible to set the focus of a textbox?

if i have an textbox with few lines of text, and i refresh the site, the
focus of textbox will move to the beginning...

but i want to let the focus of the end of the text.....
some suggestions?

best regards

rasta

----------------------------------------
HangulHanjaFastConversion-Eigenschaft

True if Microsoft Word automatically converts a word with
only one suggestion during conversion between hangul
and hanja. Read/write Boolean.
----------------------------------------

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2
hi rick,

sorry about my question-- but your syntax isnt correctly....

i have no javascript experience-- so please put the correctly
code-syntax for me

thank you very much
rasta

----------------------------------------
HangulHanjaFastConversion-Eigenschaft

True if Microsoft Word automatically converts a word with
only one suggestion during conversion between hangul
and hanja. Read/write Boolean.
----------------------------------------

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2876
by: Rodrigo DeJuana | last post by:
Howdy, I'm new to this .net stuff and really have little to no training. Im trying to create a new page for a web form, so i have been pretty much jsut coping code. I having some issue with...
4
6892
by: Jurjen de Groot | last post by:
I'm developing a ASP.NET/VB.NET web application. (VS.NET 2003) I've created several webpages, but on two pages one textbox colors yellow (the background) and I can't get the background to appear...
5
2465
by: Steve S | last post by:
Heres what I want to do...User types into a texbox, clicks a button, the button saves that text to a file. The problem is that when I click the submit button, any changes made to the textbox are...
0
1799
by: Newasps | last post by:
Hi guys, I have a problem with UpdateCommand Event. In tihs event Ä°'m creating required controls to get that controls' values and also get them. But when I try to get updated values I'm getting the...
0
1413
by: Luis Esteban Valencia | last post by:
am trying to databind within an asp:textbox control. I have tried many variations found here but nothing seems to work. It works fine if I use a regular HTML textbox input though. Here is what I...
7
2092
by: I am Sam | last post by:
I have a DataGrid that is passing information to a stored procedure properly but the parameters aren't being casted properly. I was woundering if anyone can tell me how I should properly cast the...
2
19815
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know. Thanks in advance. Mamatha
3
2207
by: Brad Rogers | last post by:
All, Being immersed in vb.net and trying CSharp after almost a year I forgot the differences. I like vb fixing the uppercase/lowercase names and seeming to be more flexible to code entry. ...
0
2386
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
1
1610
by: Andy B | last post by:
I have this code: protected void EditEventsWizard_NextButtonClick(object sender, WizardNavigationEventArgs e) { //get the values from the DetailsView TextBox StartTime =...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7095
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7361
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7015
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5602
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3183
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.