JScript code
var txtID = document.getElementById("textbox_IDno").value
var x=new ActiveXObject("Microsoft.XMLHTTP");
x.open("post","Default.aspx?IDno="+txtID,false);
x.send(null);
if (x.status == 200)
{//返回成功
document.getElementById("textbox_Name").value = x.responseText;
}
aspx.cs:
C# codeprotected void Page_Load(object sender, EventArgs e)
{
if(Request["IDno"]!= null)
{
string sql = "select x....."
//取出你的结果,我就不写了
....
......
Response.Write(取出的Name);
Response.End();
}
}