For goodness sakes, sort out your indentation! :laugh:
It's easy enough to do - if your code compiles, then CTRL+K CTRL+D will do it.
But...you need to fix the compilation errors first.
Start with your strings:
ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script language="javascript">window.open('ReportFormFTE4050.aspx','PrintMe','height=650px,width=950px,scrollbars=1');</script>");
Won't compile becasue teh "embedded" double quotes terminate the string. Try:
ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script language=\"javascript\">window.open('ReportFormFTE4050.aspx','PrintMe','height=650px,width=950px,scrollbars=1');</script>");
Then, you can format it, and it's clearer how VS will see the code:
if (Page.IsValid)
{
int iTextBoxFTE40 = Convert.ToInt32(TextBoxFTE40.Text);
int iTextBoxHC50 = Convert.ToInt32(TextBoxFTE50.Text);
if (iTextBoxFTE40 > 40)
if (iTextBoxHC50 > 50)
{
TextBoxINST_ID.Text = Session["inst_id"].ToString();
ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script language=\"javascript\">window.open('ReportFormFTE4050.aspx','PrintMe','height=650px,width=950px,scrollbars=1');</script>");
ScriptManager.RegisterStartupScript(this, typeof(Page), "myscript", "alert('You have successfully submitted the electronic portion of the General and Enrollment Profile. Please send your signed Profile along with any required attachments to SACSCOC, Attn: Profiles, 1866 Southern Lane, Decatur, Ga 30033.');location.href='WelcomeMenu.aspx';", true);
}
else if (iTextBoxHC50 > 50)
{
TextBoxINST_ID.Text = Session["inst_id"].ToString();
ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script language=\"javascript\">window.open('ReportFormFTE50.aspx','PrintMe','height=650px,width=950px,scrollbars=1');</script>");
ScriptManager.RegisterStartupScript(this, typeof(Page), "myscript", "alert('You have successfully submitted the electronic portion of the General and Enrollment Profile. Please send your signed Profile along with any required attachments to SACSCOC, Attn: Profiles, 1866 Southern Lane, Decatur, Ga 30033.');location.href='WelcomeMenu.aspx';", true);
}
else if (iTextBoxFTE40 > 40)
{
TextBoxINST_ID.Text = Session["inst_id"].ToString();
ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script language=\"javascript\">window.open('ReportFormFTE40.aspx','PrintMe','height=650px,width=950px,scrollbars=1');</script>");
ScriptManager.RegisterStartupScript(this, typeof(Page), "myscript", "alert('You have successfully submitted the electronic portion of the General and Enrollment Profile. Please send your signed Profile along with any required attachments to SACSCOC, Attn: Profiles, 1866 Southern Lane, Decatur, Ga 30033.');location.href='WelcomeMenu.aspx';", true);
}
else if (iTextBoxFTE40 < 40)
{
TextBoxINST_ID.Text = Session["inst_id"].ToString();
ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script language=\"javascript\">window.open('ReportFormFTE.aspx','PrintMe','height=650px,width=950px,scrollbars=1');</script>");
ScriptManager.RegisterStartupScript(this, typeof(Page), "myscript", "alert('You have successfully submitted the electronic portion of the General and Enrollment Profile. Please send your signed Profile along with any required attachments to SACSCOC, Attn: Profiles, 1866 Southern Lane, Decatur, Ga 30033.');location.href='WelcomeMenu.aspx';", true);
}
}
So now, you can see what your "if"s are doing:
if (Page.IsValid)
{
int iTextBoxFTE40 = Convert.ToInt32(TextBoxFTE40.Text);
int iTextBoxHC50 = Convert.ToInt32(TextBoxFTE50.Text);
if (iTextBoxFTE40 > 40)
if (iTextBoxHC50 > 50)
{
}
else if (iTextBoxHC50 > 50)
{
}
else if (iTextBoxFTE40 > 40)
{
}
else if (iTextBoxFTE40 < 40)
{
}
}
And then it's obvious that that won't work!
The first "else if" is the same as the "if" condition above it!