代码如下
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>civ</title>
</head>
<body>
<script language="vb" runat="server">
sub page_load(Sender As Object, Args As EventArgs)
dim list as arraylist
list=new arraylist()
list.add("British")
list.add("French")
list.add("Germans")
repeater1.datasource=list
repeater1.databind()
end sub
</script><asp:repeater id=repeater1 runat="server">
<template name="itemtemplate">
<%# container.dataitem %><br>
</template>
</asp:repeater>
</body>运行出错。提示如下
Server Error in '/' Application.
--------------------------------------------------------------------------------Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File --><configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File --><configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
请问错在哪里。谢谢:)
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>civ</title>
</head>
<body>
<script language="vb" runat="server">
sub page_load(Sender As Object, Args As EventArgs)
dim list as arraylist
list=new arraylist()
list.add("British")
list.add("French")
list.add("Germans")
repeater1.datasource=list
repeater1.databind()
end sub
</script><asp:repeater id=repeater1 runat="server">
<template name="itemtemplate">
<%# container.dataitem %><br>
</template>
</asp:repeater>
</body>运行出错。提示如下
Server Error in '/' Application.
--------------------------------------------------------------------------------Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File --><configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File --><configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
请问错在哪里。谢谢:)
解决方案 »
- 数据绑定问题
- |zyciis| 在验证控件RegularExpressionValidator的属性ValidationExpression他的值转取HTML中显示的时候是用哪一个方法改换的 谢谢
- 50分:请问怎样把程序打包成setup.exe.谢谢。
- 想做个订单管理系统
- 网站连接数据库非常慢,请大家指导还要采用什么样的方法才会快一些?
- RGB颜色如何转为以0X开头的十六进制颜色
- 探讨 asp.net 里的数据缓存与装箱拆箱的问题
- 请教一个html页面怎么才能把一个中文字符串传递给一个.net页面?不能使用get方法。
- 如何实现新闻页面图文新闻的绑定(放分50)
- 小弟有一DataList 的问题,很难解决,请高手指教 (高分想送)
- datagrid 编辑时错误。
- 网站的标题栏被人修改了,如何改回来??
不管哪个控件,只要是<asp:xxx runat="server">的都要出错。傻了
</asp:repeater>
这样行不行?
我用C#的
DataBind()后不需要再用<%# container.dataitem(0) %>来绑定数据了