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
array_diff weirdness
I'm using the following bit of code
$diff = array_diff($pids, $pidlist);
$diff = array_va
Certain files upload, while others do not
I want to read the data from an uploaded file. Not sure why, but it only uploads for certain files.
Do something every fifth time?
I'm trying to write a loop, but I want it to do something different after every fifth instance. Like
Required to login help
I'm trying to set up my site so users have to be logged into the forum to access the site.I've been
how to timeout $doc = new DOMDocument()->load($url)
I am currently using this $doc->load($url) to fetch an rss feed.
If a feed takes long than
PHP Directory Listing Not working
Hey Guys,
I need help, I tried a ton of directory listing scripts and they all don't work. Al
Not Loading Function Into Div
I'm not sure whether to put this under the php forum or ajax forum but because I tink it's more of a
Display thumbnails as square while retaining aspect ratio
I am trying to figure out a way to make an image display as a square, for example 80x80 pixels, when
calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same
Pulling out some result data from MYSQL
Hey Guys,
I've built a PHP page that has a for just imagine something like registration form