Y
Yiu
Below is my code:
for(int cnt=info.count;cnt>0;cnt--)
{
label[cnt-1]=new Label();
label[cnt-1].Text=(String)info[cnt-1];
Page.Controls.Add(label[cnt-1]);
page.response.write("<tr><td> </td></tr>");
}
But have something wrong in the output, the <tr><td> </td></tr>
not print between the label, it print at the head of the HTML.Why?Have
solution?
<span>free</span><span>science museum</span> is my Label output.
Below is my HTML output after add Label use the code above:
<tr><td> </td></tr><tr><td> </td></tr>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<title>showinformation</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="generator">
<meta content="C#" name="code_language">
<meta content="JavaScript" name="vs_defaultclientscript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetschema">
</head>
<body ms_positioning="gridlayout">
<form name="Form1" method="post" action="ShowInformation.aspx"
id="form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwtNTMwNzcxMzI0Ozs+XUGdiuz4iPEe85152UYL3O0Fa+A=" />
<FONT face="新細明體">
<input type="submit" name="BackButton" value="Back"
id="BackButton" style="height:32px;width:64px;Z-INDEX: 101; LEFT:
24px; POSITION: absolute; TOP: 288px" /></font></form>
</body>
</html>
<span>free</span><span>science museum</span>
for(int cnt=info.count;cnt>0;cnt--)
{
label[cnt-1]=new Label();
label[cnt-1].Text=(String)info[cnt-1];
Page.Controls.Add(label[cnt-1]);
page.response.write("<tr><td> </td></tr>");
}
But have something wrong in the output, the <tr><td> </td></tr>
not print between the label, it print at the head of the HTML.Why?Have
solution?
<span>free</span><span>science museum</span> is my Label output.
Below is my HTML output after add Label use the code above:
<tr><td> </td></tr><tr><td> </td></tr>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<title>showinformation</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="generator">
<meta content="C#" name="code_language">
<meta content="JavaScript" name="vs_defaultclientscript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetschema">
</head>
<body ms_positioning="gridlayout">
<form name="Form1" method="post" action="ShowInformation.aspx"
id="form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwtNTMwNzcxMzI0Ozs+XUGdiuz4iPEe85152UYL3O0Fa+A=" />
<FONT face="新細明體">
<input type="submit" name="BackButton" value="Back"
id="BackButton" style="height:32px;width:64px;Z-INDEX: 101; LEFT:
24px; POSITION: absolute; TOP: 288px" /></font></form>
</body>
</html>
<span>free</span><span>science museum</span>