0% found this document useful (0 votes)
41 views3 pages

ASP.NET Web Calculator Functions

The document appears to be code for a web form that performs mathematical calculations. It includes click event handlers for buttons to add, subtract, multiply, divide, calculate maximum, minimum, and power. The handlers call methods on a proxy to perform the calculations, catch exceptions if the input is invalid, and update labels to display the results.

Uploaded by

Senthil R
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views3 pages

ASP.NET Web Calculator Functions

The document appears to be code for a web form that performs mathematical calculations. It includes click event handlers for buttons to add, subtract, multiply, divide, calculate maximum, minimum, and power. The handlers call methods on a proxy to perform the calculations, catch exceptions if the input is invalid, and update labels to display the results.

Uploaded by

Senthil R
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

using using using using using using using using using using using using ublic $

System; System.Configuration; System.Data; System.Linq; System.Web; System.Web.Security; System.Web.UI; System.Web.UI.HtmlControls; System.Web.UI.WebControls; System.Web.UI.WebControls.WebParts; System.Xml.Linq; JSim WebSer!iceWebSer!ice; artial class "Default # System.Web.UI.Page

JSim WebSer!iceWebSer!ice.JSim CalcWebSer!iceSer!ice ro%y; rotecte& !oi& Page"Loa&'ob(ect sen&er) *!ent+rgs e, $ ro%y - ne. JSim WebSer!iceWebSer!ice.JSim CalcWebSer!iceSer!ice',; / $ rotecte& !oi& btn+&&ition"Clic0'ob(ect sen&er) *!ent+rgs e, try $ 1utton lbl2esult+&&; 3e%t1o% t%t; 3e%t1o% t%t4; lbl2esult+&&.3e%t -52esult# 5 6 ro%y.a&&ition'&ouble.Parse't%t.7etHas8Co&e,) &ouble.Parse't%t4.7etHas8Co&e,,; / catc8 '9ormat*%ce tion, $ lbl2esult+&&ition.3e%t - 52esult# In!ali&e In ut5; / U &atePanel+&&ition.U &ate',; / rotecte& !oi& btnSubtraction"Clic0'ob(ect sen&er) *!ent+rgs e, $ try $ lbl2esultSubtraction.3e%t - 52esult# 5 6 ro%y.subtraction'&ouble.Parse't%tSubtractionParameter4.3e%t,) &ouble.Parse't%tSubtractionParameter:.3e%t,,; / catc8'9ormat*%ce tion, $ lbl2esultSubtraction.3e%t - 52esult# In!ali&e In ut5; / U &atePanelSubtraction.U &ate',; / rotecte& !oi& btn;ulti lication"Clic0'ob(ect sen&er) *!ent+rgs e, $ try $

lbl2esult;ulti lication.3e%t - 52esult# 5 6 ro%y.multi lication'&ouble.Parse't%t;ulti licationParameter4.3e%t,) &ouble.Parse't%t;ulti licationParameter:.3e%t,,; / catc8 '9ormat*%ce tion, $ lbl2esult;ulti lication.3e%t - 52esult# In!ali&e In ut5; / U &atePanel;ulti lication.U &ate',; / $ rotecte& !oi& btnDi!ision"Clic0'ob(ect sen&er) *!ent+rgs e, try $

lbl2esultDi!ision.3e%t - 52esult# 5 6 ro%y.&i!ision'&ouble.Parse't%tDi!isionParameter4.3e%t,) &ouble.Parse't%tDi!isionParameter:.3e%t,,; / catc8 '9ormat*%ce tion, $ lbl2esultDi!ision.3e%t - 52esult# In!ali&e In ut5; / U &atePanelDi!ision.U &ate',; / rotecte& !oi& btn;a%imum"Clic0'ob(ect sen&er) *!ent+rgs e, $ try $ lbl2esult;a%;in.3e%t - 52esult# 5 6 ro%y.ma%imum'&ouble.Parse't%t;a%;inParameter4.3e%t,) &ouble.Parse't%t;a%;inParameter:.3e%t,,; / catc8 '9ormat*%ce tion, $ lbl2esult;a%;in.3e%t - 52esult# In!ali&e In ut5; / U &atePanel;a%;in.U &ate',; / rotecte& !oi& btn;inimum"Clic0'ob(ect sen&er) *!ent+rgs e, $ try $ lbl2esult;a%;in.3e%t - 52esult# 5 6 ro%y.minimum'&ouble.Parse't%t;a%;inParameter4.3e%t,) &ouble.Parse't%t;a%;inParameter:.3e%t,,; / catc8 '9ormat*%ce tion, $ lbl2esult;a%;in.3e%t - 52esult# In!ali&e In ut5; / U &atePanel;a%;in.U &ate',; / rotecte& !oi& btnPo.er"Clic0'ob(ect sen&er) *!ent+rgs e, $ try $

lbl2esultPo.er.3e%t - 52esult# 5 6 ro%y. o.er'&ouble.Parse't%tPo.erParameter4.3e%t,) &ouble.Parse't%tPo.erParameter:.3e%t,,; / catc8 '9ormat*%ce tion, $ lbl2esultPo.er.3e%t - 52esult# In!ali&e In ut5; / U &atePanelPo.er.U &ate',; / /

You might also like