htmnlによって読み取られるサーバー名を持つファイルを取得しようとしています(読み取りを行うためのac#スクリプトを使用)が、名前をhtmlに渡すスクリプトを取得できません。これは次のコードです。
<%@ Page Language="C#" MasterPageFile="~/MasterPage3.master" Title="Services" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<center>
<script runat="server">
string[] server = new string[] { };
void Button1_Click(Object sender, EventArgs e)
{
string[] server = System.IO.File.ReadAllLines(@"C:\server.txt"); //here i get the name of the server
return server[1];
}
</script>
<br />
<table width="600px" style="border-color: Silver; border-style: solid; border: 1">
<tr>
<td style="background-color: LightBlue; text-align: center">
<a href="Default.aspx?SERVER=1">1</a>
</td>
</tr>
<tr>
<td style="background-color: LightBlue; text-align: center">
<a href="Default.aspx?SERVER=2">2</a>
</td>
</tr>
<tr>
<td style="background-color: LightBlue; text-align: center">
<a href='Default.aspx?SERVER=' <%#server[1]%>>JD5PKF1</a>
</td>
//but i cant get it to be read here
</tr>
<input type="button" value="All in one" onclick="location.href='Option2.aspx';">
</table>
</center>
</asp:Content>
何か案は?