General information
Category:
The Mere Mortals .NET Framework
Tim,
Not sure if I can post my webform's LOAD event or not since I'm getting some kind of UT error about a tag...
protected void Page_Load(object sender, EventArgs e)
{
this.oResponse = (NARBHA.CPS24Hour_BO.Response)this.RegisterBizObj(new NARBHA.CPS24Hour_BO.Response());
if (!IsPostBack)
{
string responseID = Request.QueryString["ResponseID"];
if (responseID == null) Response.Redirect("main.aspx?msg=No Response ID passed.");
if (!this.GetResponseByID(responseID)) Response.Redirect("main.aspx?msg=Bad Response ID passed.");
Session["dsResponse"] = this.oResponse.DataSet;
}
}
private bool GetResponseByID(string responseid)
{
this.oResponse.getResponseByID(responseid);
if (this.oResponse.EntityList.Count == 0)
{
this.lblMessage.Text = "Your query returned no data. Please try again.";
this.lblMessage.Visible = true;
return false;
}
if (this.oResponse.EntityList.Count == 1) return true;
if (this.oResponse.EntityList.Count > 1)
{
this.lblMessage.Text = "Your query returned too many rows of data. Please try again.";
this.lblMessage.Visible = true;
return false;
}
return false;
}
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only