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
php call servlet
I have done a php backup application .
So there is a form that user pick some files to zip and d
Day of week
I am using PHP version 5.0.5
I have a varaible ($DATE (date format yyyy-mm-dd)) that is being inc
Allowing ' and "
Hello everyone,
I am creating a form where users submit information to go into a database. I
Email to a friend script problems
I have this send-to-a-friend script with 2 issues:
1) When you open the form popup on a p
PEAR in appliactiond development
When I was picking up PHP I went from procedural programming, fairly quickly into OOP, then after wr
Preg_match with an array
is there an away to use preg_match with an array?
i want to check a string with an array to s
Session variable help
I'm having a very troubling issue. Maybe I'm just looking over something but I have looked at the co
Transferring session variables into MySQL
I am trying to transfer $_SESSION variables into MySQL. However there is an error in my MySQL statem
Xacute search within SQL results
I have a query that is pulling data, and I want to return a specific value from the results of that
How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor