ASPxClientUtils.DeleteCookie(name) Method
Deletes a cookie with the specified name.
Declaration
static DeleteCookie(
name: string
): void
Parameters
Name | Type | Description |
---|---|---|
name | string | A string value that represents the name of a cookie. |
Remarks
Note that the DeleteCookie method is not in effect if the deleted cookie has an HttpOnly flag or all cookies are set to HTTP only via the web.config.
<httpCookies httpOnlyCookies="true" />
Example
<dx:ASPxCallbackPanel ID="ASPxCallbackPanel1" runat="server" ClientInstanceName="callbackPanel">
</dx:ASPxCallbackPanel>
<dx:ASPxButton ID="ASPxButton1" runat="server" Text="Table 1" AutoPostBack="False">
<ClientSideEvents Click="function(s, e) {
ASPxClientUtils.DeleteCookie('ASPxGridViewCookies');
callbackPanel.PerformCallback('1');
}" />
</dx:ASPxButton>
<dx:ASPxButton ID="ASPxButton2" runat="server" Text="Table 2" AutoPostBack="False">
<ClientSideEvents Click="function(s, e) {
ASPxClientUtils.DeleteCookie('ASPxGridViewCookies');
callbackPanel.PerformCallback('2');
}" />
</dx:ASPxButton>
See Also