473,791 Members | 3,154 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2 Basic Questions

1. How can I set a button/image as the default so when the user will press
on the enter button that specified button/image will receive the event

2. Is there a method that will insert the cursor into a textbox (or set the
focus to any other control)

Thank you,
Samuel
Jun 12 '06 #1
4 1040
Sam, I used the info from this article, check it out

http://weblogs.asp.net/scottgu/archi...04/421647.aspx

Jose
"Samuel Shulman" <sa************ @ntlworld.com> wrote in message
news:u%******** ********@TK2MSF TNGP04.phx.gbl. ..
1. How can I set a button/image as the default so when the user will press
on the enter button that specified button/image will receive the event

2. Is there a method that will insert the cursor into a textbox (or set
the focus to any other control)

Thank you,
Samuel

Jun 12 '06 #2
under ASP.NET 2.0

inside the <form> tag just add the
defaultbutton=" mySubmitButton" defaultfocus="m yTextbox"

this answer your two questions :-)
--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Samuel Shulman" <sa************ @ntlworld.com> escreveu na mensagem
news:u%******** ********@TK2MSF TNGP04.phx.gbl. ..
1. How can I set a button/image as the default so when the user will press
on the enter button that specified button/image will receive the event

2. Is there a method that will insert the cursor into a textbox (or set
the focus to any other control)

Thank you,
Samuel

Jun 12 '06 #3
Hi
I actually use 1.1

"Bruno Alexandre" <br*********@gm ail.com> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
under ASP.NET 2.0

inside the <form> tag just add the
defaultbutton=" mySubmitButton" defaultfocus="m yTextbox"

this answer your two questions :-)
--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Samuel Shulman" <sa************ @ntlworld.com> escreveu na mensagem
news:u%******** ********@TK2MSF TNGP04.phx.gbl. ..
1. How can I set a button/image as the default so when the user will
press on the enter button that specified button/image will receive the
event

2. Is there a method that will insert the cursor into a textbox (or set
the focus to any other control)

Thank you,
Samuel


Jun 12 '06 #4
Samuel, then use javascript for the focus. something along the following
lines

function setFocus(id)
{
//document.all["textUserNa me"].focus()
document.all[id].focus()
}

and cally from the body tag with the onload event
"Samuel Shulman" <sa************ @ntlworld.com> wrote in message
news:uV******** ******@TK2MSFTN GP03.phx.gbl...
Hi
I actually use 1.1

"Bruno Alexandre" <br*********@gm ail.com> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
under ASP.NET 2.0

inside the <form> tag just add the
defaultbutton=" mySubmitButton" defaultfocus="m yTextbox"

this answer your two questions :-)
--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Samuel Shulman" <sa************ @ntlworld.com> escreveu na mensagem
news:u%******** ********@TK2MSF TNGP04.phx.gbl. ..
1. How can I set a button/image as the default so when the user will
press on the enter button that specified button/image will receive the
event

2. Is there a method that will insert the cursor into a textbox (or set
the focus to any other control)

Thank you,
Samuel



Jun 12 '06 #5

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

Similar topics

2
4240
by: AK | last post by:
I don't want any part of the previous discussion on Visual Basic versus Visual Basic.Net. My query is about using Visual Basic for Applications; and whether it is better to use Visual Basic 6 or Visual Basic.Net as a springboard for studying VBA. I use Office 2000 and would like to use VBA as a tool to customize it. I have zero programming experience. I would like to read through and work on the examples of a beginners
8
10701
by: Orange Free | last post by:
I want to create a program that will ask a user a series of questions and then generate a Microsoft Word document whose content is dictated by the answers. I am not a professional programmer, and I understand only a little about OO programming. Should I a) stick to -- *gasp* -- Visual Basic to accomplish my goal; b) use Python, with which I am somewhat familiar, and which I would prefer to use; or
7
9290
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. # No warranty express or implied for the accuracy, fitness to purpose
2
5188
by: Steven O. | last post by:
First, this may not be the correct newsgroup. I have some relatively basic questions on SQL. I tried to find a newsgroup that was specifically just about SQL, and was surprised to find that all the SQL-related newsgroups seem to be product related. But if I missed something, and someone can steer me to a correct newsgroup, please do so. My specific questions: 1. I want to put comments in an SQL script. For example, I want
4
2230
by: Ramesh | last post by:
hi, Let me ask some basic questions. Can anybody explain me about the following questions: 1. When we have to create sn key? Whenever we compiled Component we have to create or it is a one time process? 2. What information contained in sn key. I gone through that it is having public key. How it is using this key to intract with client. 3. When we have to run gacutil.exe file. Whenever we
3
1689
by: Jim H | last post by:
If there is a site someone can point me to that answers such basic questions, rather than taking up support's time posting answers, please let me know. I've developed C# .NET, unmanaged C++, and MFC applications. I have not written any C++.NET apps yet and have some very basic questions. Are managed C++ programs fully independent executables or are they still processed at run time like C# and vb.net apps are? Is the finished product...
2
2976
by: Fay Yocum | last post by:
BEWARE beginner questions!! I have some experience in Access but never as much as I want or need. I have decided to get in on VB.Net. I would only rate myself in Access as a Beginner/Intermediate VBA programmer. I have decided to go at learning VB.Net in a more organized manner. I have some questions where answers are not becoming clear with VB.Net. So here goes. 1 All of the books I have accessed do basic one-two form examples...
0
541
by: software2006 | last post by:
ASP And Visual Basic Interview questions and answers I have listed over 100 ASP and Visual Basic interview questions and answers in my website http://www.geocities.com/myinterviewquestions/ASPAndVisualBasic.htm So please have a look and make use of it.
4
2648
by: Goran Djuranovic | last post by:
Hi all, I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page. - Why is this happening? - Can I disable automatic declaration and have everything be declared manually? - Any other options to fix this? Thanks in advance. Goran Djuranovic
2
1397
by: LayneMitch via WebmasterKB.com | last post by:
Hello. This is a basic quiz. Only about 3 questions. I'm having issue with the answer key which stays on a certain value regardless of acknowledging that you have the correct answer for the first and moving on to the next answer. Here's the code: <html><head><title>Problem7</title>
0
9669
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9517
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10156
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9997
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9030
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5435
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.