| |||||
Request.Cookies PropertySystem.Web Namespace HttpRequest Class Gets a collection of cookies sent by the client. [ VB ] Public ReadOnly Property Cookies As HttpCookieCollection [ C# ] public HttpCookieCollection Cookies {get;} [ C++ ] public: __property HttpCookieCollection* get_Cookies ( ); [ JScript ] public function get Cookies ( ) : HttpCookieCollection; Property ValueAn HttpCookieCollection object representing the client's cookie variables. RemarksThe Request.Cookies collection enables you to retrieve the values of the cookies sent in an HTTP request. This collection contains all the ExampleThe following example [ C# ] shows how you can dynamically retrieve ( and display into an HTML table ) the name, value, expiration date, and security parameter of each HTTP cookie sent by the client. <table class="data" width="90%">
<tr>
<th>Name</th>
<th>Value</th>
<th>Expires</th>
<th>Secure</th></tr>
<% foreach ( string key in Request.Cookies ) { %>
<tr>
<td><%= key %></td>
<td><%= Request.Cookies[ key ] .Value %></td>
<td><%= Request.Cookies[ key ] .Expires %></td>
<td><%= Request.Cookies[ key ] .Secure %></td></tr>
<% } %>
</table>
See AlsoResponse.Cookies HttpRequest Members |
| ||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme