can i control the literal position?

G

Guest

Hi,

I have a web form page. it has gridlayout and a table at top like a
template. When I have the literal or requiredfieldvalidator ErrorMsg
displayed, they are all over the page.

Is there any way to control their locations?

Thanks. -dale
PS: The html code is below:
<%@ Page language="c#" Codebehind="contactUs.aspx.cs"
AutoEventWireup="false" Inherits="passwordProtectCSharp.contactUs" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>contactUs</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<TABLE style="Z-INDEX: 102; LEFT: 8px; WIDTH: 737px; POSITION: absolute;
TOP: 8px; HEIGHT: 183px"
cellSpacing="1" cellPadding="1" width="737" border="0">
<TBODY style="FONT-SIZE: smaller">
<TR>
<td style="WIDTH: 162px; HEIGHT: 106px">
<IMG alt="" src="sd_logo.gif" align="top">
</td>
<TD style="HEIGHT: 106px" align="center">
<P>
<FONT face="Verdana" color="blue" size="5"><STRONG>Web User Control
Login Sample</STRONG></FONT>
</P>
<P>
<STRONG><FONT color="#0000ff" size="4">Welcome!</FONT></STRONG>
</P>
</TD>
</TR>
<TR>
<TD style="WIDTH: 162px" vAlign="top">
<P><asp:hyperlink id="Hyperlink3" runat="server"
NavigateUrl="default.aspx">Back to Home</asp:hyperlink></P>
<P>
<asp:hyperlink id="HyperLink2" runat="server"
NavigateUrl="privatePage.aspx">Go to Protected Page</asp:hyperlink>
</P>
</TD>
<TD>
<P style="COLOR: red">
Note: From and Subject are required fields
</P>
</TD>
</TR>
</TBODY>
</TABLE>
<P>
<asp:textbox id="txtFrom" style="Z-INDEX: 101; LEFT: 88px; POSITION:
absolute; TOP: 264px" Width="520px"
Runat="server"></asp:textbox><asp:requiredfieldvalidator
id="vldtxtFrom" Runat="server"
ErrorMessage="!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'From' is required
field!"
ControlToValidate="txtFrom"></asp:requiredfieldvalidator><br>
<asp:textbox id="txtSubject" style="Z-INDEX: 104; LEFT: 88px; POSITION:
absolute; TOP: 296px"
Width="520px" Runat="server"></asp:textbox><asp:requiredfieldvalidator
id="vldtxtSubject" Runat="server"
ErrorMessage="!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'Subject' is required
field!"
ControlToValidate="txtSubject"></asp:requiredfieldvalidator></P>
<asp:textbox id="txtMessage" style="Z-INDEX: 105; LEFT: 16px; POSITION:
absolute; TOP: 328px"
Width="592px" Runat="server" Height="176px"
TextMode="MultiLine"></asp:textbox><br>
<asp:button id="butSend" style="Z-INDEX: 109; LEFT: 16px; POSITION:
absolute; TOP: 520px" Runat="server"
Text="Send"></asp:button>
<input id="butReset" style="Z-INDEX: 110; LEFT: 80px; POSITION: absolute;
TOP: 520px" type="reset"
value="Cancel">
<br>
<asp:literal id="litStatus" runat="server"></asp:literal>
<asp:Label id="lblFrom" style="Z-INDEX: 106; LEFT: 16px; POSITION:
absolute; TOP: 264px" runat="server">From:</asp:Label>
<asp:Label id="lblSubject" style="Z-INDEX: 108; LEFT: 16px; POSITION:
absolute; TOP: 296px"
runat="server">Subject:</asp:Label>
</form>
</body>
</HTML>
 
G

Guest

changed literal to lable. it works now. thanks.

dale zhang said:
Hi,

I have a web form page. it has gridlayout and a table at top like a
template. When I have the literal or requiredfieldvalidator ErrorMsg
displayed, they are all over the page.

Is there any way to control their locations?

Thanks. -dale
PS: The html code is below:
<%@ Page language="c#" Codebehind="contactUs.aspx.cs"
AutoEventWireup="false" Inherits="passwordProtectCSharp.contactUs" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>contactUs</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<TABLE style="Z-INDEX: 102; LEFT: 8px; WIDTH: 737px; POSITION: absolute;
TOP: 8px; HEIGHT: 183px"
cellSpacing="1" cellPadding="1" width="737" border="0">
<TBODY style="FONT-SIZE: smaller">
<TR>
<td style="WIDTH: 162px; HEIGHT: 106px">
<IMG alt="" src="sd_logo.gif" align="top">
</td>
<TD style="HEIGHT: 106px" align="center">
<P>
<FONT face="Verdana" color="blue" size="5"><STRONG>Web User Control
Login Sample</STRONG></FONT>
</P>
<P>
<STRONG><FONT color="#0000ff" size="4">Welcome!</FONT></STRONG>
</P>
</TD>
</TR>
<TR>
<TD style="WIDTH: 162px" vAlign="top">
<P><asp:hyperlink id="Hyperlink3" runat="server"
NavigateUrl="default.aspx">Back to Home</asp:hyperlink></P>
<P>
<asp:hyperlink id="HyperLink2" runat="server"
NavigateUrl="privatePage.aspx">Go to Protected Page</asp:hyperlink>
</P>
</TD>
<TD>
<P style="COLOR: red">
Note: From and Subject are required fields
</P>
</TD>
</TR>
</TBODY>
</TABLE>
<P>
<asp:textbox id="txtFrom" style="Z-INDEX: 101; LEFT: 88px; POSITION:
absolute; TOP: 264px" Width="520px"
Runat="server"></asp:textbox><asp:requiredfieldvalidator
id="vldtxtFrom" Runat="server"
ErrorMessage="!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'From' is required
field!"
ControlToValidate="txtFrom"></asp:requiredfieldvalidator><br>
<asp:textbox id="txtSubject" style="Z-INDEX: 104; LEFT: 88px; POSITION:
absolute; TOP: 296px"
Width="520px" Runat="server"></asp:textbox><asp:requiredfieldvalidator
id="vldtxtSubject" Runat="server"
ErrorMessage="!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'Subject' is required
field!"
ControlToValidate="txtSubject"></asp:requiredfieldvalidator></P>
<asp:textbox id="txtMessage" style="Z-INDEX: 105; LEFT: 16px; POSITION:
absolute; TOP: 328px"
Width="592px" Runat="server" Height="176px"
TextMode="MultiLine"></asp:textbox><br>
<asp:button id="butSend" style="Z-INDEX: 109; LEFT: 16px; POSITION:
absolute; TOP: 520px" Runat="server"
Text="Send"></asp:button>
<input id="butReset" style="Z-INDEX: 110; LEFT: 80px; POSITION: absolute;
TOP: 520px" type="reset"
value="Cancel">
<br>
<asp:literal id="litStatus" runat="server"></asp:literal>
<asp:Label id="lblFrom" style="Z-INDEX: 106; LEFT: 16px; POSITION:
absolute; TOP: 264px" runat="server">From:</asp:Label>
<asp:Label id="lblSubject" style="Z-INDEX: 108; LEFT: 16px; POSITION:
absolute; TOP: 296px"
runat="server">Subject:</asp:Label>
</form>
</body>
</HTML>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top