如果是这种整数加法的ASP运算代码楼主可以使用循环来做
<%
Dim NumAry(26),i,Total,IsError,temp,rs
IsError=False
For i=1 To 26
temp=Request.Form("a"&CStr(i))
NumAry(i)=CInt(temp)
Total=Total+CInt(Temp)
Next
session("zong")=Total
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [check] where xing='"&session("xing")&"'",conn,1,3
Response.Write "<script language=javascript >"
IF rs.EOF Then
rs.addNew
For i=1 To 26
Dim FieldName
FieldName="a"&CStr(i)
rs(FieldName)=NumAry(i)
Next
rs("zong")=session("zong")
rs("user")=session("user")
rs("xing")=session("xing")
rs("arress")=session("arress")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Write "alert('记录完成');"
Response.Write "window.location.href='reg.asp';"
else
Response.write "alert('你填写过一次了');"
Response.Write "window.location.href='reg.asp';"
end if
Response.Write "</script>"
%>
这种情况下应该使用循环或数组来完成操作。