I get a red underline under the Server Class:
Server.Transfer("~/PostEdit.aspx");
The mistake is:
Cannot access a non-static member of outer type ‘System.Web.UI.Page’ via nested type ‘AnswerQuestion.ThreadTable’
AnswerQuestion is the partial class and ThreadTable is a custom class that I made.
You are not inside the
Pageinstance, so you don’t have access to theServerproperty, which is a shortcut to theServerproperty in the HTTP context.Use the static
Currentproperty to get the context of the current page: