lblEtotal=(Convert.ToString((lblEW.Text) + (lblEfa1.Text) + (lblEfa11.Text)));
lblETotal.Text = (int.Parse(lblEW.Text) + int.Parse(lblEfa1.Text) + int.Parse (lblEfa11.Text)).ToString();
lblEtotal.Text=(int.Parse(lblEW.Text) + int.Parse(lblEfa1.Text) + int.Parse(lblEfa11.Text)).ToString();
int n1, n2, n3; if (int.TryParse(lblEW.Text, out n1) && int.TryParse(lblEfa1.Text, out n2)) && int.TryParse(lblEfa11.Text, out n3)) lblEtotal.Text= (n1+n2+n3).ToString;
<pre lang="xml"><asp:Label ID="lblEW" runat="server" >1</asp:Label> <asp:Label ID="lblEfa1" runat="server" >2</asp:Label> <asp:Label ID="lblEfa11" runat="server" >2</asp:Label> <asp:Label ID="lblEtotal" runat="server" ></asp:Label>
int ans = Convert.ToInt32(lblEW.Text) + Convert.ToInt32(lblEfa1.Text) + Convert.ToInt32(lblEfa11.Text); lblEtotal.Text = Convert.ToString(ans); Response.Write(lblEtotal.Text);
output will be 5
lblEtotal.Text==(Convert.ToString(int.Parse(lblEW.Text) + int.Parse(lblEfa1.Text) + int.Parse(lblEfa11.Text)));
int ans= int.Parse(lblEW.Text)+int.Parse(lblEfa11.Text)+int.Parse(lblEfa1.Text) lblEtotal.Text = Convert.ToString(ans);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)