【发布时间】:2014-07-25 14:35:42
【问题描述】:
我正在尝试获取 c# 函数返回的字符串并将其显示在我创建的 html 表中。我有一个调用 c# button_onclick 函数的 asp.net 按钮:
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
我还有一个html表格:
<table>
<tr>
<th>Col1</th>
<th><span>Col2</span></th>
<th>Col3</th>
</tr>
<tr>
<td>Random1</td>
<td>Random2</td>
<td>Random3</td>
</tr>
</table>
我有一个链接到按钮单击的 c# 函数。
protected void Button1_Click(object sender, EventArgs e)
{
//not sure what to do here. I want to call a separate function which will return
//an array of 3 strings which would go in place of Random1, Random2, Random3 in the table
}
我不使用 asp.net 表的原因是因为我想将 css 用于我的 html 表(如果有办法将该 css 合并到 asp.net 表中,或者如果我的逻辑在这里完全关闭)。 知道我应该如何处理这个问题吗?
【问题讨论】:
标签: c# html css asp.net visual-studio