I have a form that when a user logins in to their welcome page they can click on a link that will take them into another form for them to fill out. Once the form is filled out they can click submit and the code saves the data into the database and redirects the user back to their welcome page. All of the users have the same link on their welcome page. My question is how can I get the form to redirect to the current user welcome page?
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Drawing;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Data.SqlClient;
using System.Configuration;
using System.Drawing.Printing;
public partial class FTEEnrollmentInformation : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ButtonSubmit_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["PassConnectionString"].ConnectionString);
SqlCommand cmd = new SqlCommand ("Insert into TableFTE (FT_UNDERGR, FT_GRAD, FTE_UNDERG, FTE_GRAD, NON_CREDIT, TOTAL_FTE, FCFTUHC, FCFTPBHC, FCPTUHC, FCPTBHC, NCHC) values (@FT_UNDERGR, @FT_GRAD, @FTE_UNDERG, @FTE_GRAD, @NON_CREDIT, @TOTAL_FTE, @FCFTUHC, @FCFTPBHC, @FCPTUHC, @FCPTBHC, @NCHC); Insert into TableGRADRATE (ASTUDENTS, ACOMPLETED, ATRANSFERS, BSTUDENTS, BCOMPLETED, BTRANSDERS, YEAR, DATE) values (@ASTUDENTS, @ACOMPLETED, @ATRANSFERS, @BSTUDENTS, @BCOMPLETED, @BTRANSDERS, @YEAR, @DATE);", con);
cmd.CommandType = CommandType.Text;
cmd.Parameters.AddWithValue("@FT_UNDERGR", TextBoxFTUG.Text);
cmd.Parameters.AddWithValue("@FT_GRAD", TextBoxFTG.Text);
cmd.Parameters.AddWithValue("@FTE_UNDERG", TextBoxTHUGDR.Text);
cmd.Parameters.AddWithValue("@FTE_GRAD", TextBoxTHGDR.Text);
cmd.Parameters.AddWithValue("@NON_CREDIT", TextBoxNCCDR.Text);
cmd.Parameters.AddWithValue("@TOTAL_FTE", TextBoxTCNC.Text);
cmd.Parameters.AddWithValue("@FCFTUHC", TextBoxTNFUG.Text);
cmd.Parameters.AddWithValue("@FCFTPBHC", TextBoxTNFG.Text);
cmd.Parameters.AddWithValue("@FCPTUHC", TextBoxTNCPUG.Text);
cmd.Parameters.AddWithValue("@FCPTBHC", TextBoxTNCPG.Text);
cmd.Parameters.AddWithValue("@NCHC", TextBoxTNNCC.Text);
cmd.Parameters.AddWithValue("@ASTUDENTS", TextBoxTNUGSC.Text);
cmd.Parameters.AddWithValue("@ACOMPLETED", TextBoxTNUGSCD.Text);
cmd.Parameters.AddWithValue("@ATRANSFERS", TextBoxTTOUG.Text);
cmd.Parameters.AddWithValue("@BSTUDENTS", TextBoxTNGSC.Text);
cmd.Parameters.AddWithValue("@BCOMPLETED", TextBoxTNGSCD.Text);
cmd.Parameters.AddWithValue("@BTRANSDERS", TextBoxTTOG.Text);
cmd.Parameters.AddWithValue("@YEAR", TextBoxYEAR.Text);
cmd.Parameters.AddWithValue("@DATE", TextBoxDATE.Text);
con.Open();
cmd.ExecuteNonQuery();
Response.Redirect("FormAPublic.aspx");
}
public class PCPrint : System.Drawing.Printing.PrintDocument
{
}
protected void ButtonPrint_Click(object sender, EventArgs e)
{
}
}