"If one of these parameters is missing, throw an error."
The easiest thing for me to check is the missing "type" in the url.
I have spent a lot of time reading and googling for assistance, but I am not able to figure this out.
Any help is appeciated! Thanks!!
Here's the code that does not catch any errors, but continues to display what's in the default.aspx. The ID and TYPE are empty in the URL.
using System;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string idString;
string typeString;
idString = Request.QueryString["ID"];
typeString = Request.QueryString["TYPE"];
try
{
if (typeString == null);
}
catch (Exception ex)
{
Response.Write("<b> Error messsage: </b><br />" + ex.Message);
}
FlashVars1.Text = string.Format("<param name=\"FlashVars\" value=\"id={0}&type={1}\" />", idString, typeString);
}
}

New Topic/Question
Reply




MultiQuote




|