Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: URGENT : Button Behavior


Message #1 by mams_developer@h... on Tue, 19 Nov 2002 14:09:18
Thanx a lot for the prompt reply

I wish to ask following:
1. I have added many buttons, each button has a url associated with it. I 
am not able to know, if I press ENTER key, code associated with which 
button will be executed? In all forms, code associated with one or the 
other button is executed. For example if i have two buttons in four 
different forms, in one form button 1 is executed whereas in other form 
code associated with button 2 is executed. I want to know, how can I 
control this behavior??

regards,

Arti Mahendra Sharma


> Try adding the OnClick event to the imagebutton control....
For example:
<asp:ImageButton id="button1" OnClick="LogOut" ImageUrl="" 
runat="server" />
This will only fire the LogOut function.


-----Original Message-----
From: mams_developer@h... [mailto:mams_developer@h...]
Sent: Wednesday, November 20, 2002 7:24 AM
To: ASPX_Professional
Subject: [aspx_professional] Re: URGENT : Button Behavior


> hi,

> I developed one web site but the pages are behaving in an absurd manner.
T> he problem is that I added more than one web controls button as my
r> equirement was to have an image on them. Now I have set the tab order
as
w> ell, but when I load the page and press the enter key, different
buttons
a> re executed on different pages. I am not able to guess on what criteria
t> he buttons are being executed.

> I wish to ask following:
1> . Can one aspx page have more than one submit buttons? As all the
buttons
a> dded on the page are web controls which are by default submit.
2> . How can I control behavior of the buttons that I have added? I wish
to
a> sk, can i restrict or suggest that if enter key is pressed, the page
s> hall do this or go to the specified page?

> thanx a lot

> please reply ASAP
---
Change your mail options at http://p2p.wrox.com/manager.asp or
to unsubscribe send a blank email to



  Return to Index