Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hi
I'm having the weirdest problem my label is not showing any values when populated by the ok button in a modalpopup. when I use a breakpoint to check I find that the label is being populated but the value just does not show. and the popup does not disappear when ok or cancel button is clicked it merely gets docked on the form as per design but does pop up again when I hit the target control


C#
protected void btnAddSave_Click(object sender, EventArgs e)
{
    BusinessLogicLayer.QuoteProduct objex = new BusinessLogicLayer.QuoteProduct();
    objex.propProdId = txtProdId.Text;
    objex.propQouteNo = Convert.ToInt32(lblQouteNo.Text);
    objex.propProdDesc = txtProdDesc.Text;
    objex.propFinish = txtFinish.Text;
    objex.propProdQty = Convert.ToInt32(txtQty.Text);
    objex.propProdPrice = Convert.ToDecimal(txtPrice.Text);
    objex.SaveQProd();
    if ( lblFullAmt.Text == string.Empty)
    {
        Famt = Convert.ToDecimal(txtPrice.Text);
    }
    else
    {
        Famt = Convert.ToDecimal(lblFullAmt.Text) + Convert.ToDecimal(txtPrice.Text);
    }
    lblFullAmt.Text = Convert.ToString(Famt * Convert.ToInt32(txtQty.Text)); //it populates fine though 
    LblDep.Text = Convert.ToString(Convert.ToDecimal(lblFullAmt.Text) / 2);

    txtProdlist.Text = txtProdlist.Text + "\r\n" + lblProdIDmod.Text + " " + txtProdDesc.Text + "    " + txtQty.Text + " " + txtFinish.Text + "  " + txtPrice.Text;
    
}
Posted
Updated 2-Aug-12 0:24am
v2

1 solution

This code seems to be alright. Try to add your label inside your update panel. Update Panel updates only specific part of the web page. If your label in inside that update panel then only the text property of the label will be changed, otherwise not.

So, you can have that label inside update panel.


--Amit
 
Share this answer
 
Comments
mlingo209 2-Aug-12 6:39am    
thanks it works, do u know what I should do with the popup not hiding?
_Amy 2-Aug-12 6:41am    
Welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900