下面的代码是一个例子,我只想知道这是否可以完成。在#include html文件中从服务器端c访问html控件#
我有一个test.aspx文件,这个服务器端包含标签;
<!--#include file="listOfCountries.htm" -->
在listOfCountries.htm,我有:
<html>
<div>
<select id="countryList" runat="server">
<option></option>
...
</select>
</div>
</html>
现在,有访问test.aspx.cs “countryList” 文件的方法吗?
在另一个说明中,假设我没有在test.aspx中包含#include“Countries.htm”,是否可以通过test.aspx.cs访问Countries.htm中的控件? (即在cs中访问外部html文件控件)
解决方案是不使用服务器端包含('#include')。没有人会这样做。改用用户控制。 – 2010-02-27 11:16:23