Don't like ads? PRO users don't see any ads ;-)
Guest

Ashwini Pastebin

By: a guest on Aug 4th, 2012  |  syntax: C#  |  size: 0.98 KB  |  hits: 23  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. IN YOUR UPDATEPRESENTATION.ASPX.CS
  2.  
  3. String projectRecordId = Request.QueryString["ProjectRecordId"];
  4.                 //this allows me to check if editprojectportfolio querystring was tampered. if it was, we will redirect user here.
  5.                 if (projectRecordId == null || projectRecordId == "0" || projectRecordId == "")
  6.                 {
  7.                     Response.Redirect("ManageProject.aspx?editProjectValidity=false");
  8.                 }
  9.  
  10. IN YOUR MANAGEPRESENTATION.ASPX.CS
  11.  
  12. String editProjectValidity = Request.QueryString["editProjectValidity"];
  13.  
  14.                 if (editProjectValidity != null || editProjectValidity != "0")
  15.                 {
  16.                     if (editProjectValidity == "false")
  17.                         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>");
  18.                 }