I am trying to get a string returned by a c# function and display it in an html table I have created. I have an asp.net button which calls a c# button_onclick function:
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
I also have an html table:
<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>
I have a c# function linked to the button click.
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
}
The reason I'm not using an asp.net table is because I want to use the css for my html table (let me know if there's a way to incorporate that css into an asp.net table, or if my logic is completely off here). Any idea how I should approach this?