Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8168963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:41:54+00:00 2026-06-06T20:41:54+00:00

I have the following validation summary control in the markup: <asp:ValidationSummary ID=vsValErrs CssClass=errors HeaderText=<div><%#

  • 0

I have the following validation summary control in the markup:

<asp:ValidationSummary ID="vsValErrs" CssClass="errors" HeaderText="<div><%# TranslatedMessage%></div>" runat="server" />

where TranslatedMessage is a property defined in the code behind. The problem is that the validation summary control gets rendered as

<div id="vsValErrs" class="errors" style="color:Red;">
    <div>
        <!--[CDATA[<%# TranslatedMessage%-->
        ]]&gt;
    </div>
</div>

which causes the content to be rendered incorrectly, probably because the ]]> part is outside the comment block. Why does this happen?

For those who are wondering, the reason for having a div in the HeaderText attribute is because I’m using it to style the header text (using a CSS selector that selects the first div, in the errors class); it’s probably not best practice but this is the only way I’ve come up with.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T20:41:56+00:00Added an answer on June 6, 2026 at 8:41 pm

    Have you try by setting headertext property value in pageload event like

    protected void Page_Load(..)
    {
    ..
    ValidationSummury1.HeaderText="<div>"+TranslatedMessage+"</div>";
    }
    

    If translated message is not available then put it into session varible and set it to HeaderText property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following piece of asp: <asp:ValidationSummary ID=RegisterUserValidationSummary runat=server CssClass=failureNotification ValidationGroup=RegisterUserValidationGroup/> ... <asp:Label
I have a custom user control that contains asp:ValidationSummary . It is placed on
I'm facing the following problem: I'm using validation summary popup for displaying errors on
I have the following validation in a model: validates_length_of :description, :minimum => 2, :on
I have the following script validation.php <?php if(!isset($_SESSION['userId'])){ session_destroy(); header('Location: home.php'); exit; } ?>
I have the following code validation php script: if(empty($_POST['captcha_code'])) { $error = 1; $code[3]
I have been following the validation for Entry boxes from here . The code
I have the following classes defined to do validation: public class DefValidator : IValidate<IDef>
I have the following code to enable validation work: $(document).ready(function() { $(#eventForm).validate({ rules: {
I have the following code block for validation in PHP and I can't figure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.