steve

steve

  • NA
  • 5
  • 0

redirection in c#

Aug 9 2009 2:11 PM

I have a form.  When it is completed, it redirects the user to a thank you page. 
<%@ Page Language="C#" masterpagefile="../../../msrtpage/hra2.master" title="Sign Up Here" %>
<asp:Content id="Content1" runat="Server" contentplaceholderid="hra1">
 <script runat="server">
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        Response.Redirect("thanksfirst.aspx");
    }
<asp:FormView id="FormView1" runat="server" CssClass="dform" DataKeyNames="ID" DataSourceID="entrysheet" DefaultMode="Insert" OnItemInserted="FormView1_ItemInserted" >

I left the form out of this but the button command is insert.
I've introduced a list box with choices and I'd like to redirect based on the choice, rather than have a static redirect like i have now.  I'd appreciate any suggestions or a resource where I could figure this out.  Thanks
 

Answers (2)