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
storing results of a function - previous result overwritten with new result
I have created a function to validate input.
function validate_dimension($value,$name) {
<
How to show more than 1 users with this code...
Hello,
i have a table that shows users only if I, as Administrator, want to be shown. But its sho
help retrieiving results and doing pagination
Having some trouble trying to get the results to show on more than just one page.
What is ha
PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg
Curly Bracket Delimeters.
I'd always believed that the starting and ending delimeters in preg_ functions had to be the same ch
Images in email problem
I found this script for sending emails, it works but if the email has <img src="image.jp
parameter passing issue on function
Well I thought I had created a pretty slick web page, using ?page and $_GET to load pages which wher
getting a website's source code as a variable? How?
Hey guys, is there any way for me to get the source code of a website as a variable for me to work w
Setting a default timezone?
I have read about how to change the timezone in PHPMYADMIN, but it changes back, it doesn't STAY the
php include email form with attachment
I have had no luck with finding a email form all over the Internet for various reasons. Some insecur