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

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

    HyperLinkField Help

    Bruno Alexandre, Dec 1, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,462
    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:
    956
    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,146
    =?Utf-8?B?SkdvcmRvbg==?=
    Nov 17, 2005
  4. Renato
    Replies:
    0
    Views:
    1,989
    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,813
    =?Utf-8?B?Y2dhbWJpbm8=?=
    Jan 11, 2006
Loading...

Share This Page