FormView.FooterTemplate and button clicks

  • Thread starter Thread starter Andy B.
  • Start date Start date
A

Andy B.

I have a button in a FormView.FooterTemplate and need to write code for its
click event. I tried putting it in the ItemCommand of the formView and just
putting it in the click event of the button. Nothing happens when I run the
page and click the button. How exactly would you do this?
 
Hi,
go to the design view and click the tag , you can see a formview tasks.
Click on the dropdown and select footertemplate, you can find your button,
just double click on it. This will generate a event. put your click event.

I think this post will help you,

Vijay chandar
 
Hi. When I looked online, I found the MSDN entry for FormView.ItemCommand.
It basically says that any button click event in the form view control is
handeled by the ItemCommand event. I put my click event code in there like
this:

Select case E.CommandName
Case "CancelInsert 'override the default cancel operation.
Respones.Redirect(NavigateURL(PortalSettings.ActiveTab.ActiveTabID))
End Select

Either way it goes, if I put it in ItemCommand or put it in a button click
event for the button (without the select), it always fails. If I were to put
the code in a button click event that was just somewhere on the page, it
would work. I resorted to putting it in a wizard instead.
 
Hi Andy,
Sorry for the late reply.
Itemcommand event handles only events which occurs item template. Item
template is something which gets repeated.
I think controls in footer template will be handled by the respective event
handlers.

If you have any suggesions. Reply.

Vijay chandar.
 
Back
Top