开发者

Textbox TextChangedEvent not firing?

I'm working on a basic eCommerce site and I am looking for some help regarding a live calculation that needs to be made when the user ent开发者_如何学JAVAers a numeric value into a text box.

Currently I have set the calculation the happen in a TextChanged event tied to the textbox but this does not seem to be working??? I am wondering if I need to set auto postback to true but I would like the avoid reloading the page if it can be helped!!!

Any help would be great! Here is the code behind the button

 protected void TB_Quantity_TextChanged(object sender, EventArgs e)
{
    LB_price.Text = 
       (int.Parse(ViewState["Price"].ToString()) * 
          int.Parse(TB_Quantity.Text.Trim())).ToString();
}


You can not fire an asp.net event without post back the page to the server.

However, if you need the posting back to be invisible to the user, you may need to use Partial Page Update.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜