FormView.FooterTemplate and button clicks

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?
 
V

Vijay

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
 
A

Andy B.

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.
 
V

Vijay

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top