Solved

RequiredFieldValidator Dynamic

Posted on 2008-10-30
10
393 Views
Last Modified: 2012-05-05
I am setting the requiredfieldvalidator to dynamic, yet it is still leaving a gap under the text box. Isn't it supposed to not leave a line for the validator when dynamic? And open it up only when it needs to display?

<td>
textbox goes here
</br>
                        <asp:RequiredFieldValidator ID="valLastName" runat="server" Display="Dynamic"></asp:RequiredFieldValidator>
</td>
0
Comment
Question by:Starr Duskk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 21

Expert Comment

by:silemone
ID: 22844332
where do you want your validator to show the mess?  i don't see a message...I would suggest you put the <asp:RequiredFieldValidator in a <div> or <span>  that way when empty, it will collapse...
0
 
LVL 21

Expert Comment

by:silemone
ID: 22844336
mess is short for message, by the way
0
 
LVL 2

Author Comment

by:Starr Duskk
ID: 22844411
I define my message in the codebehind.
 
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:Starr Duskk
ID: 22844426
No, wrapping it in a <div> still displays the blank line where the validator is.
 
0
 
LVL 21

Expert Comment

by:silemone
ID: 22844466
there's going to be a blank line because of the <br />
0
 
LVL 2

Author Comment

by:Starr Duskk
ID: 22844644
How do I get the validator to fall on the second line if there is no br?
 
0
 
LVL 21

Expert Comment

by:silemone
ID: 22844848
place in div
0
 
LVL 21

Accepted Solution

by:
silemone earned 500 total points
ID: 22844865
<div> <asp:RequiredFieldValidator ID="valLastName" runat="server" Display="Dynamic"></asp:RequiredFieldValidator>
</div>

This way if empty, it collapses...if not, it starts on the next line.
0
 
LVL 2

Author Comment

by:Starr Duskk
ID: 22845031
I guess that's what you've been trying to tell me.
thanks!
 
0
 
LVL 21

Expert Comment

by:silemone
ID: 22845044
oops...sorry if i wasn't clear in the beginning...but happy in the end the issue was resolved.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question