private void AmountPaid_TextChanged(object sender, System.EventArgs e) { Regex regex = new Regex("^[0-9]*&"); if(regex.IsMatch(this.AmountPaid.Text) && !string.IsNullOrEmpty(this.AmountPaid.Text.Trim())) { double Balance1; double Amount1 = Convert.ToDouble(this.Amount.Text); double Amount2 = Convert.ToDouble(this.AmountPaid.Text); Balance1 = Amount1 - Amount2; //Convert.ToDouble(this.Balance.Text)= Balance1; this.Balance.Text = Convert.ToString(Balance1); } }
using Microsoft.VisualBasic; using BaseClasses.Web.UI.WebControls; using System; using System.Collections; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using BaseClasses; using BaseClasses.Data; using BaseClasses.Utils; using ReportTools.ReportCreator; using ReportTools.Shared; using System.Text.RegularExpressions;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)