?
Solved

Default button in ASP.NET

Posted on 2004-09-03
6
Medium Priority
?
1,941 Views
Last Modified: 2013-11-25
In the old world HTML/ASP, the enter key acted as a
button click event for the default submit button on a
form.

Is there anyway to do this in ASP.Net? I have seen the
accesskey property, but I want to set up the enter key to
automatically call one of the button click events on the
form (specifically the submit buttom for the form...).

Thanks - KJ
0
Comment
Question by:KingJosh
[X]
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
  • 2
6 Comments
 
LVL 5

Expert Comment

by:prashantagarw10
ID: 11976330
Yes it is possible in ASp.Net
In dotenet ide select your form so that property window diaplys its properties. In that u will find a property called Submit button(or a close match to this name). In that the value is to be choosen from a dropdown which lists all buttons available on the form. Select your submit button and it will work on enter key!!

cheers!!
Prashant
0
 

Author Comment

by:KingJosh
ID: 11976760
I don't see my form in the drop-down.  I called it "frmMain" (<form id="frmMain" method="post" runat="server">), but it's not coming up as one of the controls.  Any idea why?
0
 
LVL 5

Accepted Solution

by:
prashantagarw10 earned 400 total points
ID: 12000567
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

770 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