Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am creating custom web part editor part. I have created a text box which should only allow integer values. If non integer value is filled in , after clicking on "Apply" , error message is displayed on the label below it.

enter image description here

Problem : The label to show error message is initially set to visible = false. But still the editor web part occupies the space(Marked on Red box). How can i remove the space ? enter image description here

share|improve this question
    
You might want to work on a more friendly message... –  SHug Oct 8 '11 at 15:55
add comment

2 Answers

I'd take a look at the rendered Toolpart in IE Dev tools, see what element's creating the space, and see if you can either eliminate it in the codebehind, or reduce it's spacing (padding, margins?) via CSS.

share|improve this answer
add comment

You can try to set Display="Dynamic" on the validator control (although it should not be rendered when visible=false). Maybe the additional space is cause by a line break between the TextBox and Validator control?

share|improve this answer
    
Display=dynamic did not work as in an adding the label through .cs file. There is not line break between textbox and validator control –  Monica Jagani Sep 9 '11 at 10:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.