How to make asp.net control attribute update from javascript persistent?
-
Hi, I have a control where I calculate the height property from javascript and set that accordingly. My problem is that the control is embedded in a updatepanel which updates every second. On updating, the default height value of the control is used. How do I make the height value calculated from javascript persistent so that asp.net uses it on postback. Thanks Mike
-
Hi, I have a control where I calculate the height property from javascript and set that accordingly. My problem is that the control is embedded in a updatepanel which updates every second. On updating, the default height value of the control is used. How do I make the height value calculated from javascript persistent so that asp.net uses it on postback. Thanks Mike
There are several ways you can handle this. Let me give you two sets 1. When you calculate the height of control, hold to the value in hidden field. Then on post back after you done what ever you need to do, set the control height based on the hidden field value. This will always match to your last calculation. 2. You can use
Sys.WebForms.EndRequestEventArgs
. This event will get fired at the end of updatepanel successful update. There you can set the control size. see here[^]Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
-
Hi, I have a control where I calculate the height property from javascript and set that accordingly. My problem is that the control is embedded in a updatepanel which updates every second. On updating, the default height value of the control is used. How do I make the height value calculated from javascript persistent so that asp.net uses it on postback. Thanks Mike
just simple n easy make your height expression static. bye