
Ashwini Pastebin
By: a guest on
Aug 4th, 2012 | syntax:
C# | size: 0.98 KB | hits: 23 | expires: Never
IN YOUR UPDATEPRESENTATION.ASPX.CS
String projectRecordId = Request.QueryString["ProjectRecordId"];
//this allows me to check if editprojectportfolio querystring was tampered. if it was, we will redirect user here.
if (projectRecordId == null || projectRecordId == "0" || projectRecordId == "")
{
Response.Redirect("ManageProject.aspx?editProjectValidity=false");
}
IN YOUR MANAGEPRESENTATION.ASPX.CS
String editProjectValidity = Request.QueryString["editProjectValidity"];
if (editProjectValidity != null || editProjectValidity != "0")
{
if (editProjectValidity == "false")
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "<script type=\"text/javascript\">alert('Your Edit Portfolio querystring was invalid, you are now back on manage portfolio. press ok to acknowledge');</script>");
}