Solved

GridView Footer Button Custom Eventhandler?

Posted on 2011-03-01
3
482 Views
Last Modified: 2012-05-11
I know about using the GridView RowCommand eventhandler to catch button commandName. Just wondering if there is a way to make a custom eventhander much like using Windows Forms where double-clicking a new button in designer creates a new eventhandler (ie... button1_click).
0
Comment
Question by:pointeman
3 Comments
 
LVL 18

Accepted Solution

by:
ChetOS82 earned 125 total points
ID: 35008634
There is no automatic way (like double-clicking), but you can put an OnClick event like this:

<asp:Button runat="server" ID="button1" OnClick="button1_Click" Text="button" />

in the code-behind:

protected void button1_Click(System.Object sender, System.EventArgs e) {

}
0
 
LVL 29

Assisted Solution

by:Paul Jackson
Paul Jackson earned 125 total points
ID: 35008688
What do you want to do create an event handler for button click ?
Is your button a server control i.e. <asp:Button ...
Go to your code-behind page, at the top of the screen you have 2 dropdownl;istboxes. In the left hand one select the control you want to create an event for, in the right hand one select the event type you want to handle.

If the event handler exists it will take you to it.
If it doesn't it will create the outline of the event handler.

Hope this is what you were after.
0
 

Author Closing Comment

by:pointeman
ID: 35011946
very nice, thanks....
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now