Share via


Cookie Support

Windows Media Center SDK supports persistent and session cookies, which you can use to save data such as user authentication and state information. Simply include scripting code within your MCML document.

For example, to retrieve a session cookie, place script before your markup:

<%
sessionCookie = Request.Cookies("McmlCookieTestSession")
%>
<Mcml . . .

And then, use script within markup to to access the cookie:

<Text Content="Session: <%=sessionCookie%>" Color="White" />

Sample Explorer

  • Web > Set Cookies
  • Web > Get Cookies

See Also