读书人

帮忙解决这个有关问题后加分100

发布时间: 2012-01-18 00:23:26 作者: rapoo

帮忙解决这个问题后加分100
<script language= "C# " runat= "server ">
string twodomain= "http:// "+dr1[ "twodomain "].ToString();
</script>
dr1[ "twodomain "]是一个数据库字段
出错: An object reference is required for the nonstatic field, method, or property 'mall_shopshow.dr1 '


<%string twodomain= "http:// "+dr1[ "twodomain "].ToString();
%>
出错:System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %> ).


[解决办法]
你的dr1 在什么地方定义的?

读书人网 >asp.net

热点推荐