Solved

ValidationSummary alignment

Posted on 2004-09-22
10
1,042 Views
Last Modified: 2008-02-01
hi all
i am tring to align the ValidationSummary to center of page but i could't find any such propery?
0
Comment
Question by:sash_he
  • 5
  • 5
10 Comments
 
LVL 9

Expert Comment

by:hismightiness
ID: 12127460
Just put your mouse cursor next to the Validation Summary, and align the line (<p> tag) using the toolbar alignment button.  An alternative is to create a CSS Class for the ValidationSummary.  I have done both (depends on the project).
0
 
LVL 9

Expert Comment

by:hismightiness
ID: 12127474
Also, you can implement a <DIV> in the HTML view.  You can set the alignment using any of these methods.
0
 

Author Comment

by:sash_he
ID: 12127487
i did that it still doest show up in browser
ia m using mozilla browser
0
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!

 

Author Comment

by:sash_he
ID: 12127493
how to make  CSS Class ?
0
 
LVL 9

Expert Comment

by:hismightiness
ID: 12127524
In header of page...

<head>
<style>
.dgStyle
{
text-align: center;
}
</style>
</head>


Now just set the CSSClass property of the datagrid to "dgStyle".
0
 

Author Comment

by:sash_he
ID: 12128223
Nope i am still not getting it in mozilla
however it works fine in IE
0
 

Author Comment

by:sash_he
ID: 12128494
i have another question is to possible to display some part of errortext message in italic text some in normal text
0
 
LVL 9

Expert Comment

by:hismightiness
ID: 12128913
I just tried it in Mozilla and it worked.  Here is my example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
      <HEAD>
            <title>WebForm1</title>
            <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
            <meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
            <meta name="vs_defaultClientScript" content="JavaScript">
            <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
            <style type="text/css">
            .dgStyle { TEXT-ALIGN: center }
            </style>
      </HEAD>
      <body MS_POSITIONING="GridLayout">
            <form id="Form1" method="post" runat="server">
                  <asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 18px" runat="server"></asp:TextBox>
                  <asp:TextBox id="TextBox2" style="Z-INDEX: 102; LEFT: 17px; POSITION: absolute; TOP: 49px" runat="server"></asp:TextBox>
                  <asp:TextBox id="TextBox3" style="Z-INDEX: 103; LEFT: 16px; POSITION: absolute; TOP: 81px" runat="server"></asp:TextBox>
                  <asp:RequiredFieldValidator id="RequiredFieldValidator1" style="Z-INDEX: 104; LEFT: 184px; POSITION: absolute; TOP: 24px" runat="server" ErrorMessage="Fill in textbox 1" ControlToValidate="TextBox1" ToolTip="Fill in textbox 1">!</asp:RequiredFieldValidator>
                  <asp:RequiredFieldValidator id="RequiredFieldValidator2" style="Z-INDEX: 105; LEFT: 186px; POSITION: absolute; TOP: 54px" runat="server" ErrorMessage="Fill in textbox 2" ControlToValidate="TextBox2" ToolTip="Fill in textbox 2">!</asp:RequiredFieldValidator>
                  <asp:RequiredFieldValidator id="RequiredFieldValidator3" style="Z-INDEX: 106; LEFT: 187px; POSITION: absolute; TOP: 87px" runat="server" ErrorMessage="Fill in textbox 3" ControlToValidate="TextBox3" ToolTip="Fill in textbox 3">!</asp:RequiredFieldValidator>
                  <asp:ValidationSummary id="ValidationSummary1" style="Z-INDEX: 107; LEFT: 298px; POSITION: absolute; TOP: 13px" runat="server" HeaderText="The following errors have occurred:" CssClass="dgStyle"></asp:ValidationSummary>
                  <asp:Button id="Button1" style="Z-INDEX: 108; LEFT: 219px; POSITION: absolute; TOP: 73px" runat="server" Text="Button"></asp:Button>
            </form>
      </body>
</HTML>
0
 
LVL 9

Accepted Solution

by:
hismightiness earned 50 total points
ID: 12128928
You can do the italic/normal thing simply by putting HTML in your error messages.  For instance, in the ErrorMessage property of your validator put:

This is a <i>required</i> field!

I have also tried this in Mozilla successfully.  I am a regular user and preacher of Mozilla.  I only use other browsers at work.
0
 

Author Comment

by:sash_he
ID: 12129133
Thanks @hismightiness  for both answers
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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 was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

685 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