hello there, i have formview which is save in visual C# i want to calculate net weight as follows below code:
public partial class Weighment_Weighbridge : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void weigh_detailsChanged(object sender, EventArgs e)
{
TextBox grossweiTextBox = (TextBox)weibridzformview.FindControl("grossweiTextBox");
TextBox tareweiTextBox = (TextBox)weibridzformview.FindControl("tareweiTextBox");
TextBox netweigunnyTextBox = (TextBox)weibridzformview.FindControl("netweigunnyTextBox");
TextBox gunnyweiTextBox = (TextBox)weibridzformview.FindControl("gunnyweiTextBox");
TextBox netweiTextBox = (TextBox)weibridzformview.FindControl("netweiTextBox");
float groswei = float.Parse(grossweiTextBox.Text);
float netwea = groswei - float.Parse(tareweiTextBox.Text);
netweigunnyTextBox.Text = netwea.ToString();
float gunniwei = float.Parse(gunnyweiTextBox.Text);
float nwei = netwea - float.Parse(gunnyweiTextBox.Text);
netweiTextBox.Text = nwei.ToString();
}
}
when iam provide in inputs grosswei,tarewei there is no the netwei textbox remain empty so plz provide me code 4this as soon as poss thank u.