|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help on LinkButton vs PushButton ??Dear all,
If I used the following code on a datagrid object <Columns> <asp:ButtonColumn Text="Events" ButtonType=LinkButton CommandName="ShowEvent"> </asp:ButtonColumn> </Columns> then the datagrid_ItemCommand event is fired but when I replace the Button type to be PushButton instead, then it is not fired anymore What is the difference between those 2 button type? Which event fired when clicking on the PushButton type ? regards serge Serge,
The button column is built in to use command events which are triggered automatically. The push button operates in much the same way, but it won't automatically have an event associated with it from within the datagrid. If you want to use a button from within the grid you should set which subroutine you want it to run by specifying the subroutine's name with the button's "OnClick" property. <asp:Button Text="Events" Id="MyButton" Runat="server" OnClick="YourSubroutineNameHere"></Button> -- Show quoteHide quoteSincerely, S. Justin Gengo, MCP Web Developer / Programmer www.aboutfortunate.com "Out of chaos comes order." Nietzsche "serge calderara" <sergecalder***@discussions.microsoft.com> wrote in message news:E708876D-EEBC-4EC2-92B0-103203429615@microsoft.com... > Dear all, > > If I used the following code on a datagrid object > > <Columns> > <asp:ButtonColumn Text="Events" ButtonType=LinkButton > CommandName="ShowEvent"> > </asp:ButtonColumn> > </Columns> > > then the datagrid_ItemCommand event is fired but when I replace the Button > type to be PushButton instead, then it is not fired anymore > > What is the difference between those 2 button type? > Which event fired when clicking on the PushButton type ? > > regards > serge
Other interesting topics
global functions?
Basic question about database connection in ASP.NET Why so much trouble with ellipses? File Download 3-Tier Binding Problem ????????? reference to a "global" variable from within an aspx page Common functionality across pages, what's the best solution? Asp.net 2.0 caching and images Architectural assistance needed! Inserting a default ListItem in DropDownList Control |
|||||||||||||||||||||||