Farseer.net Lightweight Open Source Framework intermediate: BasePage, Basecontroller, Basehandler, Basemasterpage, Basecontrols base class use

Source: Internet
Author: User

Navigation

Catalog: Farseer.net Lightweight Open source Framework Catalog

Previous: Farseer.net lightweight open Source Framework intermediate article: urlrewriter Address Rewriting

Next: Farseer.net Lightweight open-source Framework intermediate article: Common extension Methods

BasePage base class: The ASPX page we created in ASP. is inherited in: System.Web.UI.Page. After using Farseer, you need to inherit to:FS. The Core.Page.BasePage .

Basecontroller base class: The MVC controller we build in ASP. Is inherited in: System.Web.Mvc.Controller. After using Farseer, you need to inherit to:FS. The Core.Page.BaseController .

Basehandler base class: The Ashx page we created in ASP. is inherited in: System.Web.IHttpHandler. After using Farseer, you need to inherit to:FS. Core.Page.BaseHandler (note here that you still have to inherit the System.Web.IHttpHandler interface)

Basemasterpage base class: The MasterPage page we created in ASP. is inherited in: System.Web.UI.MasterPage. After using Farseer, you need to inherit to:FS. The Core.Page.BaseMasterPage .

Basecontrols base class: in ASP. UserControl user controls that we build are inherited in: System.Web.UI.UserControl. After using Farseer, you need to inherit to:FS. The Core.Page.BaseControls .

Of course, the above several base classes, you can also not inherit, just through inheritance can get more convenient method functions, these methods are all in the development process and basically need to use the function.

What did the base class do?
1         /// <summary>2         ///HttpContext.Current.Request3         /// </summary>4          Public NewHttpRequest Request =HttpContext.Current.Request;5 6         /// <summary>7         ///HttpContext.Current.Response8         /// </summary>9          Public NewHttpResponse Response =HttpContext.Current.Response;Ten  One         /// <summary> A         ///Request.QueryString -         /// </summary> -          Public stringQS (stringParmsname, Encoding Encoding) the  -         /// <summary> -         ///Request.QueryString -         /// </summary> +          Public stringQS (stringparmsname) -  +         /// <summary> A         ///Request.QueryString at         /// </summary> -          PublicT qs<t> (stringParmsname, T defvalue) -  -         /// <summary> -         ///Request.Form -         /// </summary> in          PublicT qf<t> (stringParmsname, T defvalue) -  to         /// <summary> +         ///Request.Form -         /// </summary> the          Public stringQF (stringparmsname) *  $         /// <summary>Panax Notoginseng         ///first QF after QS -         /// </summary> the         /// <param name= "Parmsname" ></param> +         /// <returns></returns> A          Public stringQA (stringparmsname) the  +         /// <summary> -         ///first QF after QS $         /// </summary> $         /// <param name= "Parmsname" ></param> -         /// <returns></returns> -          PublicT qa<t> (stringParmsname, T defvalue) the  -         /// <summary>Wuyi         ///Site Title the         /// </summary> -          Public stringWebtitle {Get;Set; } Wu  -         /// <summary> About         ///go to URL $         /// </summary> -          Public voidGotourl (stringUrlparams Object[] args) -  -         /// <summary> A         ///go to URL (default to last visit) +         /// </summary> the          Public voidGotourl (stringURL ="") -  $         /// <summary> the         ///Refresh the current page the         /// </summary> the          Public voidRefresh () the  -         /// <summary> in         ///Refresh full Page the         /// </summary> the         /// <param name= "link" ></param> About          Public voidRefreshparent (stringlink) the  the         /// <summary> the         ///Return Connection Parameters +         /// </summary> -         /// <param name= "Kic" >the parameter name, value of the page to use</param> the         /// <param name= "Parmsname" >the parameter to re-assign the value</param>Bayi         /// <param name= "value" >the new parameter value</param> the         protected stringParms<t> (dictionary<string, T> Kic,stringparmsname, T value) the  -         /// <summary> -         ///Return Connection Parameters the         /// </summary> the         /// <param name= "Kic" >the parameter name, value of the page to use</param> the         /// <param name= "Parmsname" >omit key equals the value of the current parameter name</param> the         protected stringParms<t> (dictionary<string, T> Kic,stringParmsname)

As you can see, the base class actually provides some very useful methods. For example, I have often mentioned in the article: QS/QA/QF. and request, Response

By inheriting a base class, you can call without using the class name + method name. and simply by means of a name call. Because of some frequently used methods, we can simply make simple principles.

This article mainly solved some of the base class files provided by Farseer.net. And let everyone know.

Navigation

Catalog: Farseer.net Lightweight Open source Framework Catalog

Previous: Farseer.net lightweight open Source Framework intermediate article: urlrewriter Address Rewriting

Next: Farseer.net Lightweight open-source Framework intermediate article: Common extension Methods

Advertising time

QQ Group:116228666 (farseer.net Open source frame exchange) Please specify: Blog Park

Farseer.net is an ORM framework + Common tool + extension collection.

Farseer: Prophets and seers usually offer tricks and strategies in certain situations. Also hope that the framework can provide you with maximum convenience.

ORM: The English name is:object relational(relationship) Mapping(map)

Farseer.net's goal is: Quick start, rapid development, simple and convenient.

1 New 1 " Zhang San " }. Insert ()

Farseer.net Lightweight Open Source Framework intermediate: BasePage, Basecontroller, Basehandler, Basemasterpage, Basecontrols base class use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.