aspx文件控件的赋值?
hkwlk 2007-10-22 10:52:03 单位从另一网页传进来和日期取服务器日期,
如何把以上的值付给runat="server" 的两个input控件?
基本内容如下:
<%
UserName = Request.QueryString("UserName")
str_date = DateTime.Today.ToString("yyyy-MM-dd")
%>
<form id="form1" method="post" runat="server" enctype="multipart/form-data">
<table align="center">
<tr>
<td style="width: 526px">单位:<input runat="server" id="station" type="text" style="text-align:center; width: 144px;" /></td>
</tr>
<tr>
<td style="width: 526px">日期<input runat="server" id="date1" type="text" style="text-align:center; width: 144px;" /></td>
</tr>
<tr>
<td style="width: 526px">新闻标题: <input id="title" runat="server" type="text" style="width: 390px" />
</td>
</tr>
<tr>
<td style="width: 526px">新闻来源: <input id="source" runat="server" type="text" style="width: 390px" />
</td>
</tr>
<tr>
<td style="height: 129px; width: 526px;">
新闻内容:<br />
<textarea id="contest" runat="server" style="width: 507px; height: 175px" ></textarea>
</td>
</tr>
<tr>
<td style="height: 30px; width: 526px;">图像文件(可选):<input runat="server" id="fUpLoadImage" style="width: 344px; height: 22px" type="file" />
</td>
</tr>
<tr>
<td height="58" colspan="2" align="center">
<input runat="server" id="btnSave" style="width: 97px; height: 29px" type="submit" value="上 传" />
<input runat="server" id="Reset1" style="width: 101px; height: 29px" type="reset" value="重 置" /></td>
</tr>
</table>
</form>