The code in .aspx page
<asp:Panel ID="PanelId"
runat="server"
Width="100%"
Visible="true">
<div class="classname " style="font-size: 80%; font-family: arial, helvetica, verdana">
<br />
<br />
<table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" class="classname ">
<tr align="left" valign="middle">
<td>
</td>
<td>
<b>List of documents:</b>
</td>
</tr>
<tr align="left" valign="middle">
<td>
</td>
<td>
<ul>
<%= this.CsharpMethod()%>
</ul>
</td>
</tr>
</table>
</div>
</asp:Panel>
The c sharp code in .aspx.cs file
protected
string CsharpMethod ()
{
string dDoco = string.Empty;
//
Retrieve data from database
ArrayList
al = datalistMethodName();
if
(al.Count > 0)
{
dDoco += "<br><table align=\"left\"
border=\"2\" cellpadding=\"2\" width=\"95%\"
>";
dDoco += "<tr align=\"left\"
valign=\"middle\">";
dDoco += "<td><b>Document</b></td><td><b>Document
Type</b></td></tr>";
foreach
(var item in
al)
{
dDoco += "<tr align=\"left\" valign=\"middle\"
><td>" + item.Value.ToString() + "</td><td>"
+ item.Key.ToString() + "</td></tr>";
}
dDoco += "</table><br><br><br><br>";
}
return
dDoco;
}
No comments:
Post a Comment