Alternative to Hyperlinkfield?

Discussion in 'ASP .Net Web Controls' started by TJHerman, Jun 27, 2006.

  1. TJHerman

    TJHerman Guest

    I'm needing to do an insert function on a Formview and then go to another
    page, passing an ID along with it.

    I know how to do this with a hyperlinkfield control, but since I need to do
    another function first (the insert) before I open the other page, I'm
    assuming I'll need to pass my ID in the query string to open the next page.
    Can anyone tell me what the best way to accomplish this might be?
     
    TJHerman, Jun 27, 2006
    #1
    1. Advertisements

  2. You might use a button and style it to look like a hyperlink.

    <asp:Button runat="server" ID="btnInsert" CssClass="LinkStyle"
    CommandName="InsertARow" CommandArgument='<%#Eval("PK_ID") %>' Text="Insert"
    />

    Then you process the Insert while handling the ItemCommand event and
    Response.Redirect("newPage.aspx")
    --
    HTH,
    Phillip Williams
    http://www.societopia.net
    http://www.webswapp.com


    "TJHerman" wrote:

    > I'm needing to do an insert function on a Formview and then go to another
    > page, passing an ID along with it.
    >
    > I know how to do this with a hyperlinkfield control, but since I need to do
    > another function first (the insert) before I open the other page, I'm
    > assuming I'll need to pass my ID in the query string to open the next page.
    > Can anyone tell me what the best way to accomplish this might be?
     
    Phillip Williams, Jun 27, 2006
    #2
    1. Advertisements

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. Bruno Alexandre

    HyperLinkField Help

    Bruno Alexandre, Dec 1, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,579
    Michael Tkachev
    Dec 6, 2004
  2. John Smith

    Adding a HyperLinkField to a DatGrid

    John Smith, Jun 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,049
    John Smith
    Jun 17, 2005
  3. =?Utf-8?B?TWljaGFlbFk=?=

    HyperLinkField

    =?Utf-8?B?TWljaGFlbFk=?=, Nov 17, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    4,449
    =?Utf-8?B?SkdvcmRvbg==?=
    Nov 17, 2005
  4. Renato
    Replies:
    0
    Views:
    2,136
    Renato
    Jan 6, 2006
  5. =?Utf-8?B?Y2dhbWJpbm8=?=

    ASP.NET 2.0 HyperLinkField / DataNavigateUrlFields

    =?Utf-8?B?Y2dhbWJpbm8=?=, Jan 11, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    5,958
    =?Utf-8?B?Y2dhbWJpbm8=?=
    Jan 11, 2006
  6. Evian Spring
    Replies:
    2
    Views:
    5,148
    Evian Spring
    Feb 16, 2006
  7. dm1608

    GridView and HyperLinkField

    dm1608, Feb 23, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    4,973
    Darren Kopp
    Feb 23, 2006
  8. J055
    Replies:
    4
    Views:
    4,164
    Reynald Nuñez
    Jul 3, 2006
Loading...