Question
How to set page title from class. Is it possible? I can and set the page title from the page itself and user control.
Can I do this through a class using C # .Net
Here is what I want to do. On an Aspx page, I want to call a function that runs in the line header and assign the page title to the class.
SomePage.Aspx.CS
page_onload() { setPageTitle(titleValue); }
SetPageTitleClass.CS
public static void setPageTitle(string iTitle) { Page.title = iTitle; }
Problem: "Page.Title" is not available in class
source share