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
MYSQL gen help
This is my Mysql gen. can anyone tell me why this echos
MID(networkset.networkid, 3, 3) AS &q
Add trigger to UpdatePanel programmatically
Hi,I'm working on a website which uses AJAX and Masterpages. What I have is an AJAX UpdatePanel whi
Accessing element of object array
Hello
My object looks like this:
Array ( [0] => User Object ( [id] =>
getAlexaRank($url) function not working
I have made a function to get alexa rank
the site is here: http://mytestsite.rack111.com/1
SESSION question
I am building an application , a directory for auctions.
For SEO i made a script which copies a p
How to limit the calls to an API
Hello, in my simple script I call an api which effectively involves me getting an xml file.
H
how to get values from $_Post with onchange="form.submit();"?
Hi, I have a form that submit to itself with a file upload field and two other hidden field values.<
Empty text file when there is over XXXX lines of text.
define("RANDOM_FILE","/public_html/random.txt");
$randomEntry = "
Logic question
im wondering what's the best method to do the above list:
it is for alliance @ MMORPG game
PHP search multiple input field box help
I am having a problem with my search script. At current it will simply search by a selected date whi