Solved

RequiredFieldValidator Dynamic

Posted on 2008-10-30
10
349 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:BobCSD
  • 6
  • 4
10 Comments
 
LVL 21

Expert Comment

by:silemone
Comment Utility
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
Comment Utility
mess is short for message, by the way
0
 
LVL 1

Author Comment

by:BobCSD
Comment Utility
I define my message in the codebehind.
 
0
 
LVL 1

Author Comment

by:BobCSD
Comment Utility
No, wrapping it in a <div> still displays the blank line where the validator is.
 
0
 
LVL 21

Expert Comment

by:silemone
Comment Utility
there's going to be a blank line because of the <br />
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 1

Author Comment

by:BobCSD
Comment Utility
How do I get the validator to fall on the second line if there is no br?
 
0
 
LVL 21

Expert Comment

by:silemone
Comment Utility
place in div
0
 
LVL 21

Accepted Solution

by:
silemone earned 500 total points
Comment Utility
<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:BobCSD
Comment Utility
I guess that's what you've been trying to tell me.
thanks!
 
0
 
LVL 21

Expert Comment

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

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 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

8 Experts available now in Live!

Get 1:1 Help Now