1<?xml version="1.0" encoding="utf-8"?> 2<Type Name="CookieParameter" FullName="System.Web.UI.WebControls.CookieParameter"> 3 <TypeSignature Language="C#" Value="public class CookieParameter : System.Web.UI.WebControls.Parameter" /> 4 <AssemblyInfo> 5 <AssemblyName>System.Web</AssemblyName> 6 <AssemblyVersion>2.0.0.0</AssemblyVersion> 7 </AssemblyInfo> 8 <Base> 9 <BaseTypeName>System.Web.UI.WebControls.Parameter</BaseTypeName> 10 </Base> 11 <Interfaces /> 12 <Attributes> 13 <Attribute> 14 <AttributeName>System.ComponentModel.DefaultProperty("CookieName")</AttributeName> 15 </Attribute> 16 </Attributes> 17 <Docs> 18 <since version=".NET 2.0" /> 19 <remarks> 20 <attribution license="cc4" from="Microsoft" modified="false" /> 21 <para>You can use the <see cref="T:System.Web.UI.WebControls.CookieParameter" /> class to bind the value of a client-side HTTP cookie passed as part of an HTTP request to a parameter used by ASP.NET data source controls. </para> 22 <para>The <see cref="T:System.Web.UI.WebControls.CookieParameter" /> class provides the <see cref="P:System.Web.UI.WebControls.CookieParameter.CookieName" /> property, which identifies the name of the <see cref="T:System.Web.HttpCookie" /> object to bind to, in addition to those inherited from the <see cref="T:System.Web.UI.WebControls.Parameter" /> class. The <see cref="T:System.Web.UI.WebControls.CookieParameter" /> class attempts to bind to the named cookie every time the <see cref="M:System.Web.UI.WebControls.CookieParameter.Evaluate(System.Web.HttpContext,System.Web.UI.Control)" /> method is called.</para> 23 <block subset="none" type="note"> 24 <para>Controls that bind data to the parameter might throw an exception if a <see cref="T:System.Web.UI.WebControls.CookieParameter" /> object is specified, but no corresponding cookie is passed with the HTTP request. Similarly, they might display no data if the cookie is passed with null. Set the <see cref="P:System.Web.UI.WebControls.Parameter.DefaultValue" /> property to avoid these situations where appropriate.</para> 25 </block> 26 </remarks> 27 <summary> 28 <attribution license="cc4" from="Microsoft" modified="false" /> 29 <para>Binds the value of a client-side HTTP cookie to a parameter object. The parameter can be used in a parameterized query or command to select, filter, or update data.</para> 30 </summary> 31 </Docs> 32 <Members> 33 <Member MemberName=".ctor"> 34 <MemberSignature Language="C#" Value="public CookieParameter ();" /> 35 <MemberType>Constructor</MemberType> 36 <Parameters /> 37 <Docs> 38 <since version=".NET 2.0" /> 39 <remarks> 40 <attribution license="cc4" from="Microsoft" modified="false" /> 41 <para>A <see cref="T:System.Web.UI.WebControls.CookieParameter" /> object created with the <see cref="M:System.Web.UI.WebControls.CookieParameter.#ctor" /> constructor is initialized with default values for all its properties. The <see cref="P:System.Web.UI.WebControls.CookieParameter.CookieName" /> property is initialized to <see cref="F:System.String.Empty" />. Additionally, the <see cref="P:System.Web.UI.WebControls.Parameter.Name" /> property is initialized to <see cref="F:System.String.Empty" />, the <see cref="P:System.Web.UI.WebControls.Parameter.Type" /> property is initialized to <see cref="F:System.TypeCode.Object" />, the <see cref="P:System.Web.UI.WebControls.Parameter.Direction" /> property is initialized to <see cref="F:System.Data.ParameterDirection.Input" />, and the <see cref="P:System.Web.UI.WebControls.Parameter.DefaultValue" /> property is initialized to null.</para> 42 </remarks> 43 <summary> 44 <attribution license="cc4" from="Microsoft" modified="false" /> 45 <para>Initializes a new unnamed instance of the <see cref="T:System.Web.UI.WebControls.CookieParameter" /> class.</para> 46 </summary> 47 </Docs> 48 <AssemblyInfo> 49 <AssemblyVersion>2.0.0.0</AssemblyVersion> 50 </AssemblyInfo> 51 </Member> 52 <Member MemberName=".ctor"> 53 <MemberSignature Language="C#" Value="protected CookieParameter (System.Web.UI.WebControls.CookieParameter original);" /> 54 <MemberType>Constructor</MemberType> 55 <Parameters> 56 <Parameter Name="original" Type="System.Web.UI.WebControls.CookieParameter" /> 57 </Parameters> 58 <Docs> 59 <since version=".NET 2.0" /> 60 <remarks> 61 <attribution license="cc4" from="Microsoft" modified="false" /> 62 <para>The <see cref="M:System.Web.UI.WebControls.CookieParameter.#ctor(System.Web.UI.WebControls.CookieParameter)" /> constructor is a protected copy constructor used to clone a <see cref="T:System.Web.UI.WebControls.CookieParameter" /> instance. The property values of the <see cref="T:System.Web.UI.WebControls.CookieParameter" /> object, including <see cref="P:System.Web.UI.WebControls.CookieParameter.CookieName" />, <see cref="P:System.Web.UI.WebControls.Parameter.Name" />, and <see cref="P:System.Web.UI.WebControls.Parameter.Type" />, are all transferred to the new instance.</para> 63 </remarks> 64 <summary> 65 <attribution license="cc4" from="Microsoft" modified="false" /> 66 <para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.CookieParameter" /> class with the values of the instance specified by the <paramref name="original" /> parameter.</para> 67 </summary> 68 <param name="original"> 69 <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Web.UI.WebControls.CookieParameter" /> from which the current instance is initialized. </param> 70 </Docs> 71 <AssemblyInfo> 72 <AssemblyVersion>2.0.0.0</AssemblyVersion> 73 </AssemblyInfo> 74 </Member> 75 <Member MemberName=".ctor"> 76 <MemberSignature Language="C#" Value="public CookieParameter (string name, string cookieName);" /> 77 <MemberType>Constructor</MemberType> 78 <Parameters> 79 <Parameter Name="name" Type="System.String" /> 80 <Parameter Name="cookieName" Type="System.String" /> 81 </Parameters> 82 <Docs> 83 <since version=".NET 2.0" /> 84 <remarks> 85 <attribution license="cc4" from="Microsoft" modified="false" /> 86 <para>A <see cref="T:System.Web.UI.WebControls.CookieParameter" /> object created with the <see cref="M:System.Web.UI.WebControls.CookieParameter.#ctor(System.String,System.String)" /> constructor is initialized with the specified parameter name and string that identifies the cookie that the parameter binds to. Other properties, including <see cref="P:System.Web.UI.WebControls.Parameter.Type" /> and <see cref="P:System.Web.UI.WebControls.Parameter.Direction" />, are initialized with default values.</para> 87 </remarks> 88 <summary> 89 <attribution license="cc4" from="Microsoft" modified="false" /> 90 <para>Initializes a new named instance of the <see cref="T:System.Web.UI.WebControls.CookieParameter" /> class, using the specified string to identify which HTTP cookie to bind to.</para> 91 </summary> 92 <param name="name"> 93 <attribution license="cc4" from="Microsoft" modified="false" />The name of the parameter. </param> 94 <param name="cookieName"> 95 <attribution license="cc4" from="Microsoft" modified="false" />The name of the HTTP cookie that the parameter object is bound to. The default is <see cref="F:System.String.Empty" />. </param> 96 </Docs> 97 <AssemblyInfo> 98 <AssemblyVersion>2.0.0.0</AssemblyVersion> 99 </AssemblyInfo> 100 </Member> 101 <Member MemberName=".ctor"> 102 <MemberSignature Language="C#" Value="public CookieParameter (string name, TypeCode type, string cookieName);" /> 103 <MemberType>Constructor</MemberType> 104 <Parameters> 105 <Parameter Name="name" Type="System.String" /> 106 <Parameter Name="type" Type="System.TypeCode" /> 107 <Parameter Name="cookieName" Type="System.String" /> 108 </Parameters> 109 <Docs> 110 <since version=".NET 2.0" /> 111 <remarks> 112 <attribution license="cc4" from="Microsoft" modified="false" /> 113 <para>A <see cref="T:System.Web.UI.WebControls.CookieParameter" /> object created with the <see cref="M:System.Web.UI.WebControls.CookieParameter.#ctor(System.String,System.TypeCode,System.String)" /> constructor is initialized with the specified parameter name, <see cref="P:System.Web.UI.WebControls.Parameter.Type" />, and string that identifies the cookie that the parameter binds to. Only the <see cref="P:System.Web.UI.WebControls.Parameter.Direction" /> and <see cref="P:System.Web.UI.WebControls.Parameter.ConvertEmptyStringToNull" /> properties are initialized with default values.</para> 114 </remarks> 115 <summary> 116 <attribution license="cc4" from="Microsoft" modified="false" /> 117 <para>Initializes a new named and strongly typed instance of the <see cref="T:System.Web.UI.WebControls.CookieParameter" /> class, using the specified string to identify which HTTP cookie to bind to.</para> 118 </summary> 119 <param name="name"> 120 <attribution license="cc4" from="Microsoft" modified="false" />The name of the parameter. </param> 121 <param name="type"> 122 <attribution license="cc4" from="Microsoft" modified="false" />The type that the parameter represents. The default is <see cref="F:System.TypeCode.Object" />. </param> 123 <param name="cookieName"> 124 <attribution license="cc4" from="Microsoft" modified="false" />The name of the HTTP cookie that the parameter object is bound to. The default is <see cref="F:System.String.Empty" />. </param> 125 </Docs> 126 <AssemblyInfo> 127 <AssemblyVersion>2.0.0.0</AssemblyVersion> 128 </AssemblyInfo> 129 </Member> 130 <Member MemberName="Clone"> 131 <MemberSignature Language="C#" Value="protected override System.Web.UI.WebControls.Parameter Clone ();" /> 132 <MemberType>Method</MemberType> 133 <ReturnValue> 134 <ReturnType>System.Web.UI.WebControls.Parameter</ReturnType> 135 </ReturnValue> 136 <Parameters /> 137 <Docs> 138 <since version=".NET 2.0" /> 139 <remarks> 140 <attribution license="cc4" from="Microsoft" modified="false" /> 141 <para>The <see cref="M:System.Web.UI.WebControls.CookieParameter.Clone" /> method calls the <see cref="M:System.Web.UI.WebControls.CookieParameter.#ctor(System.Web.UI.WebControls.CookieParameter)" /> copy constructor to initialize a new instance of the <see cref="T:System.Web.UI.WebControls.CookieParameter" /> class with the values of the current instance.</para> 142 </remarks> 143 <summary> 144 <attribution license="cc4" from="Microsoft" modified="false" /> 145 <para>Returns a duplicate of the current <see cref="T:System.Web.UI.WebControls.CookieParameter" /> instance.</para> 146 </summary> 147 <returns> 148 <attribution license="cc4" from="Microsoft" modified="false" /> 149 <para>A <see cref="T:System.Web.UI.WebControls.CookieParameter" /> that is an exact duplicate of the current one.</para> 150 </returns> 151 </Docs> 152 <AssemblyInfo> 153 <AssemblyVersion>2.0.0.0</AssemblyVersion> 154 </AssemblyInfo> 155 </Member> 156 <Member MemberName="CookieName"> 157 <MemberSignature Language="C#" Value="public string CookieName { set; get; }" /> 158 <MemberType>Property</MemberType> 159 <Attributes> 160 <Attribute> 161 <AttributeName>System.ComponentModel.DefaultValue("")</AttributeName> 162 </Attribute> 163 </Attributes> 164 <ReturnValue> 165 <ReturnType>System.String</ReturnType> 166 </ReturnValue> 167 <Docs> 168 <value>To be added.</value> 169 <since version=".NET 2.0" /> 170 <remarks> 171 <attribution license="cc4" from="Microsoft" modified="false" /> 172 <para>The <see cref="P:System.Web.UI.WebControls.CookieParameter.CookieName" /> property identifies an HTTP cookie, which is represented by an <see cref="T:System.Web.HttpCookie" /> object and is available through the current <see cref="T:System.Web.HttpRequest" /> object. If the HTTP cookie is not available in the current <see cref="T:System.Web.HttpRequest" /> object, the <see cref="M:System.Web.UI.WebControls.CookieParameter.Evaluate(System.Web.HttpContext,System.Web.UI.Control)" /> method binds the parameter to the value of the <see cref="P:System.Web.UI.WebControls.Parameter.DefaultValue" /> property, if it is set. If the <see cref="P:System.Web.UI.WebControls.Parameter.DefaultValue" /> property is not set, the <see cref="M:System.Web.UI.WebControls.CookieParameter.Evaluate(System.Web.HttpContext,System.Web.UI.Control)" /> method fails to bind the parameter to a value.</para> 173 </remarks> 174 <summary> 175 <attribution license="cc4" from="Microsoft" modified="false" /> 176 <para>Gets or sets the name of the HTTP cookie that the parameter binds to.</para> 177 </summary> 178 </Docs> 179 <AssemblyInfo> 180 <AssemblyVersion>2.0.0.0</AssemblyVersion> 181 </AssemblyInfo> 182 </Member> 183 <Member MemberName="Evaluate"> 184 <MemberSignature Language="C#" Value="protected override object Evaluate (System.Web.HttpContext ctx, System.Web.UI.Control control);" /> 185 <MemberType>Method</MemberType> 186 <ReturnValue> 187 <ReturnType>System.Object</ReturnType> 188 </ReturnValue> 189 <Parameters> 190 <Parameter Name="ctx" Type="System.Web.HttpContext" /> 191 <Parameter Name="control" Type="System.Web.UI.Control" /> 192 </Parameters> 193 <Docs> 194 <param name="ctx">To be added.</param> 195 <since version=".NET 2.0" /> 196 <remarks> 197 <attribution license="cc4" from="Microsoft" modified="false" /> 198 <para>The <paramref name="context" /> parameter is used by the <see cref="M:System.Web.UI.WebControls.CookieParameter.Evaluate(System.Web.HttpContext,System.Web.UI.Control)" /> method to retrieve the cookies collection and the value of the cookie that the <see cref="T:System.Web.UI.WebControls.CookieParameter" /> object binds to. The <paramref name="control" /> parameter is ignored.</para> 199 </remarks> 200 <summary> 201 <attribution license="cc4" from="Microsoft" modified="false" /> 202 <para>Updates and returns the value of the <see cref="T:System.Web.UI.WebControls.CookieParameter" /> object.</para> 203 </summary> 204 <returns> 205 <attribution license="cc4" from="Microsoft" modified="false" /> 206 <para>An object that represents the updated and current value of the parameter. If the context or the request is null, the <see cref="M:System.Web.UI.WebControls.CookieParameter.Evaluate(System.Web.HttpContext,System.Web.UI.Control)" /> method returns null.</para> 207 </returns> 208 <param name="control"> 209 <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Web.UI.Control" /> that is associated with the Web Forms page where the <see cref="T:System.Web.UI.WebControls.CookieParameter" /> is used. </param> 210 </Docs> 211 <AssemblyInfo> 212 <AssemblyVersion>2.0.0.0</AssemblyVersion> 213 </AssemblyInfo> 214 </Member> 215 </Members> 216</Type>