they cannot be 一摸一样, something must be wrong with the one which is not working, show some code
解决方案 »
- wcf 错误
- vs2003获取VSS上最新版本的时候,为什么有些文件无法获取?
- 问个简单的问题!
- 用asp.net2.0开发的请进————————————————————————————————————
- 怎么让按钮不触发验证?
- asp.net編程中使用web服務 性能上有沒有影響噹噹
- WCF The remote server returned an error: (413) Request Entity Too Large.
- 初学 关于datagrid的问题
- ASP中连接ACCESS的问题,为什么会出现错误
- 一个关于DataList的问题,有请各位高手
- 如果不让浏览器提示“刷新“
- 自定义控件在动态生成时,如何确定它的left,top值。
Imports System.Data
Imports System.Data.SqlClientPublic Class allnews
Inherits System.Web.UI.Page
Protected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGrid
Protected WithEvents Label1 As System.Web.UI.WebControls.Label
Protected WithEvents Label2 As System.Web.UI.WebControls.Label
Protected WithEvents Label3 As System.Web.UI.WebControls.Label
Protected WithEvents Label4 As System.Web.UI.WebControls.Label
Protected WithEvents LinkButton2 As System.Web.UI.WebControls.LinkButton
Protected WithEvents LinkButton3 As System.Web.UI.WebControls.LinkButton
Protected WithEvents LinkButton1 As System.Web.UI.WebControls.LinkButton#Region " Web 窗体设计器生成的代码 " '该调用是 Web 窗体设计器所必需的。
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: 此方法调用是 Web 窗体设计器所必需的
'不要使用代码编辑器修改它。
InitializeComponent()
End Sub#End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'在此处放置初始化页的用户代码
Dim strserver, strsql As String
Dim con As SqlConnection
Dim com As SqlDataAdapter
Dim ds As DataSet
strserver = "server=cad097;uid=sa;pwd=luohzh;database=news"
strsql = "select newsid,newshead,shdate from t_news where shjg=1 order by shdate desc"
con = New SqlConnection(strserver)
com = New SqlDataAdapter(strsql, con)
ds = New DataSet()
com.Fill(ds, "xicad")
DataGrid1.DataSource = ds.Tables(0).DefaultView
Me.DataGrid1.DataBind() End Sub Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Response.Write("<script>window.opener=null;window.close();</script>")
End Sub
End Class
下面是没有错误的代码:
Imports System.Data
Imports System.Data.SqlClientPublic Class allnews
Inherits System.Web.UI.Page
Protected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGrid
Protected WithEvents Label1 As System.Web.UI.WebControls.Label
Protected WithEvents Label2 As System.Web.UI.WebControls.Label
Protected WithEvents Label3 As System.Web.UI.WebControls.Label
Protected WithEvents Label4 As System.Web.UI.WebControls.Label
Protected WithEvents LinkButton2 As System.Web.UI.WebControls.LinkButton
Protected WithEvents LinkButton3 As System.Web.UI.WebControls.LinkButton
Protected WithEvents LinkButton1 As System.Web.UI.WebControls.LinkButton#Region " Web 窗体设计器生成的代码 " '该调用是 Web 窗体设计器所必需的。
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: 此方法调用是 Web 窗体设计器所必需的
'不要使用代码编辑器修改它。
InitializeComponent()
End Sub#End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'在此处放置初始化页的用户代码
Dim strserver, strsql As String
Dim con As SqlConnection
Dim com As SqlDataAdapter
Dim ds As DataSet
strserver = "server=cad097;uid=sa;pwd=luohzh;database=news"
strsql = "select newsid,newshead,shdate from t_news where shjg=1 order by shdate desc"
con = New SqlConnection(strserver)
com = New SqlDataAdapter(strsql, con)
ds = New DataSet()
com.Fill(ds, "xicad")
DataGrid1.DataSource = ds.Tables(0).DefaultView
Me.DataGrid1.DataBind() End Sub Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Response.Write("<script>window.opener=null;window.close();</script>")
End Sub
End Class
应该不是代码的问题,还有什么可能吗?
帮帮我...
是不是你的HTML文件有问题?
实在不行就放到soucesafe里比较一下.