//HTML代码
<input type="button" value="====按钮===" onclick="javascript:GetVote(0);"/>
<div id="msg"></div>
//JS代码
//创建DOM
function CreateXMLHttpRequest()
{
if(window.ActiveXObject)
{return new ActiveXObject("Microsoft.XMLHTTP");}
else if(window.XMLHttpRequest)
{return new XMLHttpRequest();}
else
{return null;}
}
aspx.Cs
protected void Page_Load(object sender, EventArgs e)
{
string strName = Request.QueryString["UserName"];
if (strName.Length > 0)
{
Response.Write("1");
}
else
{
Response.Write("0");
}
}