用C#怎么写cookies(在线等)
在vs2005里面建了个windows应用程序想写cookies,,代码如下,想把label.text的值写入cookies要用asp.net读取的.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Management;
using System.Web;
using System.Web.UI;
using System.Web.UI.Adapters;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace WindowsApplication4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
public static string getCPUID()
{
string cpuInfo = "";//cpu序列号
ManagementClass cimobject = new ManagementClass("Win32_Processor");
ManagementObjectCollection moc = cimobject.GetInstances();
foreach (ManagementObject mo in moc)
{
cpuInfo = mo.Properties["ProcessorId"].Value.ToString();
}
return cpuInfo;
}
private void Form1_Load(object sender, EventArgs e)
{
label2.Text = getCPUID();
}
}
}
问题点数:100、回复次数:5Top
1 楼cnguai(怪虎)回复于 2006-03-15 17:15:58 得分 0
继续等Top
2 楼water0661(小水)回复于 2006-03-15 17:33:41 得分 33
cookies只能用于web工程中Top
3 楼ashen219(天早)回复于 2006-03-15 17:36:48 得分 33
同意楼上,winform不能用cookies。Top
4 楼cnguai(怪虎)回复于 2006-03-15 17:40:50 得分 0
不会吧,,555555555555
Top
5 楼yizhixiaozhu(天啦,手都起茧了)回复于 2006-03-15 17:45:31 得分 34
晕
winform的怎么写cookieTop




