本文介绍了如何制作待办事项清单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是Vb.Net的初学者,正在使用Microsoft Visual Studio2010.因此,我知道如何将文本从文本框传输到标签.但是如何每次都创建新标签,并提供删除任务的选项.
谢谢
I am a beginner at Vb.Net and am using Microsoft Visual Studio 2010. So I know how to transfer the text from a text box to a label. But how do I create new label every time and also give the option of deleting the task.
Thanks
推荐答案
<table>
<tr>
<td>
<table style="width: 100%;" id="tbDownloads" runat="server">
<tr>
<th>
File
</th>
<th>
Version
</th>
<th>
Uploaded on
</th>
</tr>
<!-- This table is loaded at run time: see page load function -->
</table>
</td>
</tr>
</table>
List<Downloadable> downloads = GetDownloadList();
foreach (Downloadable dl in downloads)
{
tbDownloads.Rows.Add(AddDownloadFile(dl));
}
private static HtmlTableRow AddDownloadFile(Downloadable dl)
{
HtmlTableRow row = new HtmlTableRow();
// File name
HtmlTableCell cell = new HtmlTableCell();
cell.InnerHtml = "<a href=\"FileTransferDownload.aspx?file=" + dl.Id + "\" target=\"_blank\">" + dl.FileName + "</a>";
row.Cells.Add(cell);
// Version
cell = new HtmlTableCell();
cell.InnerText = dl.Version.ToString();
row.Cells.Add(cell);
// Upload date
cell = new HtmlTableCell();
cell.InnerText = dl.UploadedOn.ToString();
row.Cells.Add(cell);
return row;
}
这使您可以更好地控制正在发生的事情.
This gives you much finer control over what is going on.
这篇关于如何制作待办事项清单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!