C# Класс Argentini.Halide.H3ClientSide

The H3ClientSide class contains methods and properties for manipulating the client-side markup of a page.
Показать файл Открыть проект

Открытые методы

Метод Описание
CookieExists ( System request, string cookieName ) : bool

Determines whther a cookie exists or not.

CookieExists ( string cookieName ) : bool

Determines whther a cookie exists or not.

CreateJsonIdArray ( Page pageObject, Control containerControl, string objectName, JsonObjectMode mode ) : void

Insert a script block which creates a JSON object with an array of client control ID names for all server-side controls. This allows access to the objects using javascript. It is best used in the Page_PreRender block. using Argentini.Halide; ... H3ClientSide.CreateJsonIdArray(MyPanel, "en", H3ClientSide.JsonObjectMode.ByID); Assuming that there is a server-side control on the page, with the ID "Control01", its run-time ID is something cryptic, like "ctl00_Body_Control01". After the code above is executed, however, Javascript code on the page itself can refer to all server-side controls by their server-side ID's, as: var obj = document.getElementById(en.Control01); $(en.Control01).value = "test";

CreateJsonIdArray ( Page page, string objectName, JsonObjectMode mode ) : void

Insert a script block which creates a JSON object with an array of client control ID names for all server-side controls. This allows access to the objects using javascript. It is best used in the Page_PreRender block. using Argentini.Halide; ... H3ClientSide.CreateJsonIdArray(Page, "en", H3ClientSide.JsonObjectMode.ByID); Assuming that there is a server-side control on the page, with the ID "Control01", its run-time ID is something cryptic, like "ctl00_Body_Control01". After the code above is executed, however, Javascript code on the page itself can refer to all server-side controls by their server-side ID's, as: var obj = document.getElementById(en.Control01);

GetCookie ( System request, string cookieName ) : String

Returns a specified cookie from a specified request object.

GetCookie ( string cookieName ) : String

Returns a specified cookie from the current request object.

RemoveCookie ( String cookieName ) : void

Remove a cookie from the client web browser.

RemoveCookie ( String cookieName, String path ) : void

Remove a cookie from the client web browser.

RemoveCookie ( String cookieName, String path, String domain ) : void

Remove a cookie from the client web browser.

SetCookie ( String cookieName, String cookieValue, String path, Int32 days ) : void

Create a cookie on the client web browser.

SetCookie ( String cookieName, String cookieValue, String path, Int32 days, String domain ) : void

Create a cookie on the client web browser.

Приватные методы

Метод Описание
H3ClientSide ( ) : System
en ( Control p, JsonObjectMode mode ) : String

Описание методов

CookieExists() публичный статический Метод

Determines whther a cookie exists or not.
public static CookieExists ( System request, string cookieName ) : bool
request System HttpRequest object.
cookieName string Name of cookie for which to verify its existence.
Результат bool

CookieExists() публичный статический Метод

Determines whther a cookie exists or not.
public static CookieExists ( string cookieName ) : bool
cookieName string Name of cookie for which to verify its existence.
Результат bool

CreateJsonIdArray() публичный статический Метод

Insert a script block which creates a JSON object with an array of client control ID names for all server-side controls. This allows access to the objects using javascript. It is best used in the Page_PreRender block. using Argentini.Halide; ... H3ClientSide.CreateJsonIdArray(MyPanel, "en", H3ClientSide.JsonObjectMode.ByID); Assuming that there is a server-side control on the page, with the ID "Control01", its run-time ID is something cryptic, like "ctl00_Body_Control01". After the code above is executed, however, Javascript code on the page itself can refer to all server-side controls by their server-side ID's, as: var obj = document.getElementById(en.Control01); $(en.Control01).value = "test";
public static CreateJsonIdArray ( Page pageObject, Control containerControl, string objectName, JsonObjectMode mode ) : void
pageObject System.Web.UI.Page The Page object.
containerControl System.Web.UI.Control The container for which all children should be used.
objectName string Name for the object with the array of names.
mode JsonObjectMode JsonObjectMode enumeration which specifies how page /// objects are to be identified; by ID or CSS class name.
Результат void

CreateJsonIdArray() публичный статический Метод

Insert a script block which creates a JSON object with an array of client control ID names for all server-side controls. This allows access to the objects using javascript. It is best used in the Page_PreRender block. using Argentini.Halide; ... H3ClientSide.CreateJsonIdArray(Page, "en", H3ClientSide.JsonObjectMode.ByID); Assuming that there is a server-side control on the page, with the ID "Control01", its run-time ID is something cryptic, like "ctl00_Body_Control01". After the code above is executed, however, Javascript code on the page itself can refer to all server-side controls by their server-side ID's, as: var obj = document.getElementById(en.Control01);
public static CreateJsonIdArray ( Page page, string objectName, JsonObjectMode mode ) : void
page System.Web.UI.Page The Page object.
objectName string Name for the object with the array of names.
mode JsonObjectMode JsonObjectMode enumeration which specifies how page /// objects are to be identified; by ID or CSS class name.
Результат void

GetCookie() публичный статический Метод

Returns a specified cookie from a specified request object.
public static GetCookie ( System request, string cookieName ) : String
request System HttpRequest object.
cookieName string Name of cookie to retrieve.
Результат String

GetCookie() публичный статический Метод

Returns a specified cookie from the current request object.
public static GetCookie ( string cookieName ) : String
cookieName string Name of cookie to retrieve.
Результат String

RemoveCookie() публичный статический Метод

Remove a cookie from the client web browser.
public static RemoveCookie ( String cookieName ) : void
cookieName String Name of the cookie to remove.
Результат void

RemoveCookie() публичный статический Метод

Remove a cookie from the client web browser.
public static RemoveCookie ( String cookieName, String path ) : void
cookieName String Name of the cookie to remove.
path String Virtual web path for cookie ownership (e.g. use "/" for the root web site).
Результат void

RemoveCookie() публичный статический Метод

Remove a cookie from the client web browser.
public static RemoveCookie ( String cookieName, String path, String domain ) : void
cookieName String Name of the cookie to remove.
path String Virtual web path for cookie ownership (e.g. use "/" for the root web site).
domain String Domain which owns the cookie (e.g. ".mydomain.com") or "" for the current domain.
Результат void

SetCookie() публичный статический Метод

Create a cookie on the client web browser.
public static SetCookie ( String cookieName, String cookieValue, String path, Int32 days ) : void
cookieName String Name of the cookie to create.
cookieValue String Cookie string value.
path String Virtual web path for cookie ownership (e.g. use "" for the root domain).
days System.Int32 Number of days until expiration.
Результат void

SetCookie() публичный статический Метод

Create a cookie on the client web browser.
public static SetCookie ( String cookieName, String cookieValue, String path, Int32 days, String domain ) : void
cookieName String Name of the cookie to create.
cookieValue String Cookie string value.
path String Virtual web path for cookie ownership (e.g. use "" for the root domain).
days System.Int32 Number of days until expiration.
domain String Domain for this cookie (e.g. use ".mydomain.com" format to save cookie for all subdomains)
Результат void