Morpheusweb.it - Risorse per webmaster: script, ASP.NET, C#, Visual Basic .Net, tutorial, asp, javascript, css, php, html, java, ADO, VBScript, forms, frames, Active Server Pages, Dynamic HTML, database, gratis per webmaster e webdesigner

Cookie Multipli - << VERSIONE VB.NET >>


Gestire cookie a pił valori


<script language="VB" runat="server">
<%@ Import Namespace="System.IO" %>
<script language="c#" runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
  HttpCookie coockieMultiplo = new HttpCookie("cookieMultiplo");
  coockieMultiplo.Values["nome"] = "nome";
  coockieMultiplo.Values["cognome"] = "cognome";
  coockieMultiplo.Values["telefono"] = "telefono";
  Response.Cookies.Add(coockieMultiplo);
  ListBox1.Items.Clear();
  HttpCookieCollection cookieCols = new HttpCookieCollection();
  cookieCols = Request.Cookies;
  foreach (string str in cookieCols)
  {
    ListBox1.Items.Add("Cookie: " + str);
    ListBox1.Items.Add("Valore:" + Request.Cookies[str].Value);
  }
}
</script>
<HTML>
<body>
<form id="Form1" method="post" runat="server">
&nbsp;
<asp:ListBox id="ListBox1" runat="server" Width="516px" Height="305px"></asp:ListBox>
</form>
</body>
</HTML>



Scarica il Codice...


Stampa la pagina


 








Inizio pagina

risorse per webmaster