definition tag. The form level setting is overridden when specified at the panel level, for those controls that are inside the panel.Also, the Event Handler for the specified button, fires thereby simulating a true submit button functionality.The following sample code contains a form and 4 panels with each of them containing different buttons. It can be noticed that for each panel, there is a default button specified which would trigger the corresponding button's event handler when "Enter" Key is pressed upon a text changed event.
The corresponding, sample events for the button clicks are
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write(Button1.Text);
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Write(Button2.Text);
}
protected void Button3_Click(object sender, EventArgs e)
{
Response.Write(Button3.Text);
}
protected void Button4_Click(object sender, EventArgs e)
{
Response.Write(Button4.Text);
}
protected void btn1_Click(object sender, EventArgs e)
{
Response.Write(btn1.Text);
}
protected void Button5_Click(object sender, EventArgs e)
{
Response.Write(Button5.Text);
}Once we execute the above functionality, we can notice, the corresponding Buttons' text are displayed when the Enter key is pressed from within a panel and at the form level, it fires the btn1 Button's event.Thanks
No comments posted yet
Your Answer:
Login to answer
237
12
Other forums
Help with Hyperlink
Hi,
What I am trying to do may be simple, I just can't get it to work. Ok...
I am usin
reading xml faster than DB call?
I am trying to optimize a high traffic website, and I enabled a feature where there are three photos
Multiple if statements
Ok so seems basic but for some reason I'm not doing it right. What I want is to be able to have 2 se
How to show a complete textarea ??
I enter Client Case Notes notes in a textarea field on a PHP form. The field is 5 rows deep and 70 c
UTL File problem
Hi
I have a file in certain path with the following permissions (The file is a dummy file witho
Can php detect connection speed and thereafter swap out elements?
No code to post, lads, yet. Just looking for a yay or nay at this stage:
Can a php script be
C - Reading a file into a byte array
Hi,
I'm trying to read a file into a byte array in C. I have to use C as this is for a loadru
Casting Decimals in Oracle
This code worked as a query in DB2, but I am not sure what the syntax is for casting decimals in Ora
weeks in a year
hi,
i found this snippet on php.net
QuoteFor the week number for weeks starting on Sunday:
"From field" in PHP email form
I used a wizard to create a PHP email form. I was able to customize it with the exception of the Fr