File:
Calculate.aspx
Bin/calculate.cs
Bin/calculate.bat
Steps:
1.calculate.cs
Namespace Calculate
{
Using System;
public class Math {
Public String _color;
public int Add (int a,int b)
{
return a+b;
}
public int Sub (int a,int b)
{
return a-b;
}
public int Mul (int a,int b)
{
return a*b;
}
Public String Color
{
get {
return _color;
}
set {
_color=value;
}
}
}
}
2.calculate.bat
Csc/t:library/out:calculate.dll Calculate.cs
3. Executive Calculate.bat
4.calculate.aspx
<% @Import namespace= "Calculate"%>
<script language= "C #" runat= "Server" >
public String color;
void Doadd (Object Src, EventArgs E)
{
Math math=new Math ();
Message.text=math. ADD (Convert.ToInt32 (A.value), Convert.ToInt32 (B.value)). ToString ();
Math. Color=c.value;
Color=math. Color;
}
void Dosub (Object Src, EventArgs E)
{
Math math=new Math ();
Message.text=math. Sub (Convert.ToInt32 (A.value), Convert.ToInt32 (B.value)). ToString ();
Math. Color=c.value;
Color=math. Color;
}
void Domul (Object Src, EventArgs E)
{
Math math=new Math ();
Message.text=math. Mul (Convert.ToInt32 (A.value), Convert.ToInt32 (B.value)). ToString ();
Math. Color=c.value;
Color=math. Color;
}
</script>
<font Id=cau color=<%response.write (color);%>> simple calculator with asp+ </font>
<form runat= "Server" >
<input id= "A" runat= "Server"/>
<input id= "B" runat= "Server"/>
<input id= "C" runat= "Server"/>
<asp:button text= "ADD" runat= "Server"/>
<asp:button text= "Sub" runat= "Server"/>
<asp:button text= "Mul" runat= "Server"/>
</form>
Result:<asp:label id=message runat= "Server"/>
File:
Calculate.aspx
Bin/calculate.cs
Bin/calculate.bat
Steps:
1.calculate.cs
Namespace Calculate
{
Using System;
public class Math {
Public String _color;
public int Add (int a,int b)
{
return a+b;
}
public int Sub (int a,int b)
{
return a-b;
}
public int Mul (int a,int b)
{
return a*b;
}
Public String Color
{
get {
return _color;
}
set {
_color=value;
}
}
}
}
2.calculate.bat
Csc/t:library/out:calculate.dll Calculate.cs
3. Executive Calculate.bat
4.calculate.aspx
<% @Import namespace= "Calculate"%>
<script language= "C #" runat= "Server" >
public String color;
void Doadd (Object Src, EventArgs E)
{
Math math=new Math ();
Message.text=math. ADD (Convert.ToInt32 (A.value), Convert.ToInt32 (B.value)). ToString ();
Math. Color=c.value;
Color=math. Color;
}
void Dosub (Object Src, EventArgs E)
{
Math math=new Math ();
Message.text=math. Sub (Convert.ToInt32 (A.value), Convert.ToInt32 (B.value)). ToString ();
Math. Color=c.value;
Color=math. Color;
}
void Domul (Object Src, EventArgs E)
{
Math math=new Math ();
Message.text=math. Mul (Convert.ToInt32 (A.value), Convert.ToInt32 (B.value)). ToString ();
Math. Color=c.value;
Color=math. Color;
}
</script>
<font Id=cau color=<%response.write (color);%>> simple calculator with asp+ </font>
<form runat= "Server" >
<input id= "A" runat= "Server"/>
<input id= "B" runat= "Server"/>
<input id= "C" runat= "Server"/>
<asp:button text= "ADD" runat= "Server"/>
<asp:button text= "Sub" runat= "Server"/>
<asp:button text= "Mul" runat= "Server"/>
</form>
Result:<asp:label id=message runat= "Server"/>
Turn from: Dynamic Network production guide www.knowsky.com