473,379 Members | 1,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Buttons in webpage issue?

Hi ALL:

I have a webpage, which has two three buttons .

what i wanna to do is that everytime i press Enter from keyboard, it alwasy
fire button1 event in webpage?

Does anyone know how can i control this?

Cheers

Nick

Nov 10 '06 #1
3 1295
Hi,

Nick wrote:
I have a webpage, which has two three buttons .

what i wanna to do is that everytime i press Enter from keyboard, it alwasy
fire button1 event in webpage?

Does anyone know how can i control this?
Container-controls will have a "DefaultButton"-property. That is, you can
set your form's property accordingly, i.e.:

<form id="form1" runat="server" defaultbutton="cmdClose">
....
<asp:Button ID="cmdClose" ...
....

If you have a panel on your page, you may create a default-button
explicitly for the controls on the panel as well. Searching this NG for
"defaultbutton" should give you more detailed information, if required.

Cheers,
Olaf
--
My .02: www.Resources.IntuiDev.com
Nov 10 '06 #2
Thanks , Olaf
it is very helpful information.

now i got following issue. coz i am using master page, so when i write
DefaultButton = "imgbSearch", it got error. the reason is the form tag is
in master page, but the button is at content page.

do you know how i can deal with it?

Cheers

Nick

"Olaf Rabbachin" wrote:
Hi,

Nick wrote:
I have a webpage, which has two three buttons .

what i wanna to do is that everytime i press Enter from keyboard, it alwasy
fire button1 event in webpage?

Does anyone know how can i control this?

Container-controls will have a "DefaultButton"-property. That is, you can
set your form's property accordingly, i.e.:

<form id="form1" runat="server" defaultbutton="cmdClose">
....
<asp:Button ID="cmdClose" ...
....

If you have a panel on your page, you may create a default-button
explicitly for the controls on the panel as well. Searching this NG for
"defaultbutton" should give you more detailed information, if required.

Cheers,
Olaf
--
My .02: www.Resources.IntuiDev.com
Nov 12 '06 #3
Hi,

Nick wrote:
now i got following issue. coz i am using master page, so when i write
DefaultButton = "imgbSearch", it got error. the reason is the form tag is
in master page, but the button is at content page.

do you know how i can deal with it?
create a panel-control within your Content-control, i.e.:

<asp:Content ID="cMain" ContentPlaceHolderID="Main" runat="Server">
<asp:Panel ID="pnlBG" runat="server" DefaultButton="cmdMyDefaultButton">
your stuff here ...
</asp:Panel>
</asp:Content>

Cheers,
Olaf
--
My .02: www.Resources.IntuiDev.com
Nov 13 '06 #4

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

Similar topics

12
by: David Walker | last post by:
Hi I have a program which I need to interface with a webpage - the webpage will accept an input (probably a 'post' string from the program) and then will process it and needs to return a value. ...
6
by: Boris | last post by:
Has anyone ever managed to read a Windows registry key in a PHP webpage? I installed the PHP extension win32std and saved their sample script from...
0
by: Jim in Arizona | last post by:
How could I dynamically create a button within a loop that holds a specific field from a database? I have a webform that loops through the records in related tables of an SQL database. I've been...
22
by: Saul | last post by:
I have a set of radio buttons that are created dynamically, after rendered I try loop thru this set by getting the length of the set, but I keep getting an error stating the element is undefined. I...
5
by: mayur_hirpara | last post by:
Hi, I have been developing web applications for a while now. However, as I was thinking through the architecture I really don't understand the "How server can identify between which buttons has...
9
by: Tiruak | last post by:
Ok, from the title you can probably tell im a beginner to Flash. I'm using CS3, and am trying to create a "menu" to this one webpage. I did 4 animated buttons, but now im having problems making...
1
by: Paddy | last post by:
The problem I am facing is as follows: I am populating an HTML table on my webpage with rows of data from a database. The rows may be sometimes 10 and sometimes say,3. I have two buttons on that...
4
by: eschneider | last post by:
I get the following error when trying to browse the .asmx. I get the same thing when trying to add a reference. using .NET 2.0 There is no error message. Any ideas? Thanks,
3
by: andersond | last post by:
I have a webpage that uses visible and hidden tables to create the effect of going from screen to screen. Because a user might want to go back and change previous selections I have a "previous page"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.