首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

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

2012-01-18 
帮忙解决这个问题后加分100scriptlanguage C# runat server stringtwodomain http:// +dr1[ t

帮忙解决这个问题后加分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 在什么地方定义的?

热点排行