Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Webform showstopper for me
Message
 
To
06/08/2008 18:18:25
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01337052
Message ID:
01337094
Views:
8
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
Map
View

Click here to load this message in the networking platform