你要是使用的是服务器控件,直接在button的点击事件中获取两个文本框的值,然后强制转换为int类型,然后直接相加赋值给第三个文本框就行了。
要是html控件就看楼上的就知道了。
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
dim a,b,s
a = request("a")
b = request("b")
if a<>"" and b<>"" then
s = cint(a) + cint(b)
end if
%>
public void Button1_Click(object sender,EventArgs e){
textbox3.Text=(int.Prase(textbox1.Text)+int.Prase(textbox2.Text))+"";
}