Wednesday, March 21, 2012

Question about the slider extender control and "hiding" the textbox it extends

Copied and pasted from the interactive sample pages, under slider tips:

TextBox visibility. The asp:TextBox that the Slider is upgrading will be visible during the page loading, so it is usable if JavaScript is not enabled on the browser. Depending on your requirements, you can prevent the asp:TextBox from being visible by setting its display mode to "none".

However, there is no display mode or displaymode property for the textbox control, nor for the slider extender. How then can I prevent the textbox from being visible while the page is loading?

Another question: is there a way to set the slider to enabled = "false" where it would show the value (e.g. the slider being at the middle of the rail for a value of 50%) without it being movable? I tried setting the textbox to enabled = false. The slider looks somewhat grayed out, but you can still click on the slider and move it. Thanks a lot.

Hi,

1) display is a CSS attribute. you should set display:none on the extended TextBox.

2) At the moment the slider can't be disabled, but this is a good suggestion.

Thanks.


Ah thanks. Forgot about the css attribute for that.

As for the slider not being enabled or disabled, I guess I'll just make it invisible for now.

No comments:

Post a Comment