FormView.FooterTemplate and button clicks

Discussion in 'ASP .Net' started by Andy B., Dec 29, 2009.

  1. Andy B.

    Andy B. Guest

    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?
     
    Andy B., Dec 29, 2009
    #1
    1. Advertising

  2. Andy B.

    Vijay Guest

    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." <> wrote in message
    news:#$...
    > 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, Dec 30, 2009
    #2
    1. Advertising

  3. Andy B.

    Andy B. Guest

    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" <> wrote in message
    news:...
    > 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." <> wrote in message
    > news:#$...
    >> 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?
    >>
     
    Andy B., Dec 30, 2009
    #3
  4. Andy B.

    Vijay Guest

    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." <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    >> 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." <> wrote in message
    >> news:#$...
    >>> 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, Jan 9, 2010
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jorge Loaiza Arango

    Access to controls in <FooterTemplate>

    Jorge Loaiza Arango, Dec 21, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    634
    Jose Suero
    Dec 21, 2003
  2. =?Utf-8?B?bWFoc2E=?=

    how can I access to controls in footertemplate

    =?Utf-8?B?bWFoc2E=?=, Jul 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    345
    =?Utf-8?B?bWFoc2E=?=
    Jul 9, 2004
  3. =?Utf-8?B?SmFzb25L?=

    Delete Button in GridView FooterTemplate

    =?Utf-8?B?SmFzb25L?=, Aug 7, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    5,544
    =?Utf-8?B?SmFzb25L?=
    Aug 8, 2006
  4. Jeff
    Replies:
    0
    Views:
    366
  5. PontiMax

    Clicks and double-clicks

    PontiMax, Jul 14, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    197
    Eliyahu Goldin
    Jul 14, 2004
Loading...

Share This Page