Home All Groups Group Topic Archive Search About
Author
27 Jun 2006 3:15 PM
TJHerman
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?

Author
27 Jun 2006 8:57 PM
Phillip Williams
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")
Show quoteHide quote
"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?