Solved

RequiredFieldValidator Dynamic

Posted on 2008-10-30
10
360 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
  • 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 1

Author Comment

by:Starr Duskk
ID: 22844411
I define my message in the codebehind.
 
0
 
LVL 1

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

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 1

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now