Solved

ValidationSummary alignment

Posted on 2004-09-22
10
1,030 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

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…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 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