Maintain Value during postback
-
Hi all, I have a Dropdown of items which on "onchange" eevent fires an XMLHttprequest to calculate its Mrp. I m showing this mrp in a label field. I m setting the value of the label using javascript like document.getElementById("Label_MRP").innerHTML=xmlHttp.responseText But when i submit the values Label_MRP.Text yields me null. What can be the problem????BTW Label_MRP is an asp Label control.
-
Hi all, I have a Dropdown of items which on "onchange" eevent fires an XMLHttprequest to calculate its Mrp. I m showing this mrp in a label field. I m setting the value of the label using javascript like document.getElementById("Label_MRP").innerHTML=xmlHttp.responseText But when i submit the values Label_MRP.Text yields me null. What can be the problem????BTW Label_MRP is an asp Label control.
Try assigning this value to a hidden textbox also, and get value from that textbox in server side. Label is rendered as HTML SPAN. Setting value to it from client side can't maintain value when page posts.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions