473,671 Members | 2,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

default form button

I know this is going to be a stupid question, but I'm in a crunch and don't
have time to research it as much as I'd like. How do you tell the web form
which button is the default button. So if a user fills out the form and
hits enter instead of clicking the submit button, the correct button gets
triggered.

In other words I have a web form with a cancel button and a submit button
and when I go into the form the and fill it out and hit enter the cancel
button is getting triggered and not the submit button.

Thanks in advance,

Jason
Nov 18 '05 #1
1 971
I believe the first button on the page will be what gets activated unless you set the focus to something else. This can all be a very tricky process.
Nov 18 '05 #2

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

Similar topics

1
6393
by: Billy Jacobs | last post by:
Is there a way to make a button on a web form the default button so that when the user hits the enter button the code for that button executes? I have a web page Login.aspx where I have only 1 button on the form. When the user hits enter the button is clicked. I have a second page mycsepp.aspx which has an asp button and a link button. When I hit enter neither of the button click events are triggered. If I tab to one of them and
0
1863
by: Shixx | last post by:
Hello, I have problem in my web application and my web form. I have 5-6 buttons (web controls) and when I have focus on some text box, always one button becomes default and got focus, and after I write something in text box and press Enter I invoke that button method ?!?! But this is not button I want to be default. I set tab orders and nothing always that button becomes default when I am on some text box on web form. How can I set default...
2
8094
by: Flip | last post by:
On my current form, when I hit the enter key in a texbox, the form appears to resubmit itself, but it's not actually doing a submit (or so I think?). I would like to have the enter button fire the logic I have for the button. In other words, I would like to have a default button for the form, is this making sense? I thought I saw on Fritz Onion's MSDN webcasts there is a way to assign a default button to a form/page, is this in fact...
5
5420
by: Wonder | last post by:
How can I create or use the msgobx to show a message without a default button. The user has explicity to click on the button, so the msgbox closes it. Thanks,
10
4813
by: cj | last post by:
Here's an easy one, I hope. How do I make button1, which I put on this form from the toolbox, the default button on the form? I thought it used to be a property in the properties window called default. It's not there now. I found in the help index an isdefault property and tried to set it in code but it doesn't show up in the list when I type button1.isdef
1
2111
by: andyrich_1 | last post by:
I have a simple form that has two submit buttons on it. The problem I have is that I want one button to be the default button when the user is filling out one section of the form and another button to be the default when filling out a different art of the form. I can't seem to find a way of stopping the first button on the form begin selected. I know there is a way to do this in ASP.NET 2.0 but I can't seem to find one in ASP.NET 1.0
3
1564
by: Anil Kumar Sharma | last post by:
Hello, I am working on C# using vs.net 2003. I have faced two interesting problems. 1. Dynamically setting Default Button: I created a form and used it in various contexts. On basis of the context, the panel of a form which contains various buttons , are shown or hides. Now at design time i set the default button property to one of button. But when the form object is created in different context and set visibilty of default
15
12531
by: simonoficina | last post by:
Hello all! I am a vb.net beginner in Spain. When I use VB6 ,the button object has a property called "default" that can set this button like press "ENTER" key. But in the VB.net I can't find this property. Where is it? Or mabye change the other thing,No?Thanks ! Simon
2
3498
by: Dave | last post by:
I have a simple little purchase form, on it is a button that takes the user to a suppliers form . The purchase form has a default view set to single form, and the supplier form has a default value set to datasheet. When I click on the button that goes to the supplier form from the purchase form, the form changes into a single form view and not the datasheet view set for it.
4
2981
by: Whasigga | last post by:
Hi I've created a form that has 7 subforms. It is the same subform, bound to a table, just repeated. This form represents a week, and each subform is used to enter in data for each day of the week. The main form has a combo box that must have a value selected before anything else can happen. Once that value is selected, the 7 subforms are enabled, and also one of the fields is populated with the value from the main form. These subforms also...
0
8485
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
8403
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
8605
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
7446
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...
1
6238
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4227
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...
0
4417
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2819
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
2062
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.