文件:
Calculate
bin/Calculate
bin/Calculate
步驟:
namespace Calculate
{
using System;
public class math
{
public String _color;
public int Add(int a
{
return a+b;
}
public int Sub(int a
{
return a
}
public int Mul(int a
{
return a*b;
}
public String Color
{
get
{
return _color;
}
set
{
_color=value;
}
}
}
}
csc /t:library /out:Calculate
<%@Import NameSpace=
<script language=
public String color;
void DoAdd(Object Src
{
math math=new math();
Message
math
color=math
}
void DoSub(Object Src
{
math math=new math();
Message
math
color=math
}
void DoMul(Object Src
{
math math=new math();
Message
math
color=math
}
</script>
<font id=Cau color=<%Response
<form runat=
<input id=
<input id=
<input id=
<asp:button Text=
<asp:button Text=
<asp:button Text=
</form>
Result:<asp:label id=Message runat=
From:http://tw.wingwit.com/Article/program/net/201311/15299.html