Solved

ValidationSummary alignment

Posted on 2004-09-22
10
1,063 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
[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
  • 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
Independent Software Vendors: 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

691 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