Author: 54sun | Posted on: 10/22/2010 8:11:15 AM | Views : 248

Hi, 
I have some functions which will be call in some pages. I don't want to define the same functions in every page as it will be hard if I need change the code.
I've already use a class to hold the common functions and use that class in the page if I need those function.
But the problem is:
Some methods in the aspx.cs page are not available in the .cs class. Such as "Session", "Responce.Redirect","Page".
Let's say I have a function which check the session value and redirect the user. 

string pId = Session["ProjectID"] as string ; if (pId != null) { Response.Redirect("~/somepage.aspx"); } else { Response.Redirect("~/default.aspx"); }
These codes g ...

Go to the complete details ...