I’m trying implement the above Se Focus code in a Class Library that i have. The class that I’m going to implement in is call HtmlHelper class but I can’t seem to reference the System.Web.UI class in the Class Library project.
How do you reference the System.Web.UI in Class library project?
You need to add a reference to the System.Web assembly (look in the .NET tab). That said, I looked at the linked code and you could pretty easily flip the function around a bit and just return a string and loose the dependency on System.Web.UI.Page. Which probably makes alot more sense in the long run.