Hey,
I have a BasePage class which is in the App_Code folder. Here, all other pages can use the methods contained. This is working OK for stuff that just returns a value, such as this:
BasePage (App_Code folder):
using System;
using System.Web;
public class BasePage : System.Web.UI.Page {
public static int PageID {
get {
return Convert.ToInt32(HttpContext.Current.Request.QueryString["mnui"]);
}
}
}
and in the actual page:
Command.Parameters.AddWithValue("@PageID", PageID);
But how would I do this for something like a text box in a master page? All of my pages look similar to this (all have the SearchExpression, SortColumn and SortDirection methods):
using System;
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
using System.Web.UI;
using System.Web.UI.HtmlCont ...
Go to the complete details ...