Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FormView.FooterTemplate and button clicks

0 views
Skip to first unread message

Andy B.

unread,
Dec 29, 2009, 8:44:07 AM12/29/09
to
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?


Vijay

unread,
Dec 30, 2009, 1:59:07 AM12/30/09
to
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

"Andy B." <a_b...@sbcglobal.net> wrote in message
news:#$S8pzIiK...@TK2MSFTNGP02.phx.gbl...

Andy B.

unread,
Dec 30, 2009, 8:48:01 AM12/30/09
to
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.
"Vijay" <vijaycha...@gmail.com> wrote in message
news:76C5EFD2-4B5E-499B...@microsoft.com...

Vijay

unread,
Jan 9, 2010, 9:14:10 AM1/9/10
to
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.

"Andy B." <a_b...@sbcglobal.net> wrote in message

news:eUhahaVi...@TK2MSFTNGP06.phx.gbl...

0 new messages