pavvy 0 Newbie Poster

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.