Guest User

Ashwini Pastebin

a guest
Aug 4th, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.98 KB | None | 0 0
  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.                 }
Advertisement
Add Comment
Please, Sign In to add comment