By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,144 Members | 972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,144 IT Pros & Developers. It's quick & easy.

can i control the literal position?

P: n/a
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>
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
changed literal to lable. it works now. thanks.

"dale zhang" wrote:
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>

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.