using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {           
            this.drpLike.Items.Add("请选择……");
            this.drpLike.Items.Add("青青草原");
            this.drpLike.Items.Add("心情驿站");
        }
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (this.drpLike.SelectedIndex > 0)
        {
            string MyLike = this.drpLike.SelectedItem.Text;
            Response.Cookies["MyLike"].Value = MyLike;
            Response.Write("您喜欢的栏目是：" + MyLike);  
            Response.Cookies["MyLike"].Expires=DateTime.Now.AddMonths(1);
        }
    }
}
