I cannot reproduce your problem with the same aspx page and this codebehind:
Public Class chaiban
Inherits System.Web.UI.Page
Protected WithEvents txtPlateNo As System.Web.UI.WebControls.TextBox
Protected WithEvents txtProductSN As System.Web.UI.WebControls.TextBox
Protected WithEvents lblMsg As System.Web.UI.WebControls.Label
Protected WithEvents Label1 As System.Web.UI.WebControls.Label
Protected WithEvents lblProductSN As System.Web.UI.WebControls.Label
Protected WithEvents lblModel As System.Web.UI.WebControls.Label
Protected WithEvents lblSpec As System.Web.UI.WebControls.Label
Protected WithEvents lblWeight As System.Web.UI.WebControls.Label
Protected WithEvents lblCnt As System.Web.UI.WebControls.Label
Protected WithEvents BUTTON2 As System.Web.UI.HtmlControls.HtmlButton
Protected WithEvents btnSave As System.Web.UI.HtmlControls.HtmlButton
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<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: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Response.Write("Page_Load is called<BR>")
End Sub
Private Sub btnSave_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.ServerClick
Response.Write("btnSave_ServerClick is called<BR>")
End Sub
End Class
Public Class chaiban
Inherits System.Web.UI.Page
Protected WithEvents lblMsg As System.Web.UI.WebControls.Label
Protected WithEvents lblModel As System.Web.UI.WebControls.Label
Protected WithEvents lblSpec As System.Web.UI.WebControls.Label
Protected WithEvents lblWeight As System.Web.UI.WebControls.Label
Protected WithEvents lblCnt As System.Web.UI.WebControls.Label
Protected WithEvents txtPlateNo As System.Web.UI.WebControls.TextBox
Protected WithEvents txtProductSN As System.Web.UI.WebControls.TextBox
Protected WithEvents BUTTON2 As System.Web.UI.HtmlControls.HtmlButton
Protected WithEvents btnSave As System.Web.UI.HtmlControls.HtmlButton
Protected WithEvents Label1 As System.Web.UI.WebControls.Label
Protected WithEvents lblProductSN As System.Web.UI.WebControls.Label
#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
'在此处放置初始化页的用户代码
End Sub
Private Sub btnSave_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.ServerClick
'Session("cnt") = 1 + CInt(Session("cnt"))
'Label1.Text = Session("cnt")
'If Session("LastValue") = Me.txtPlateNo.Text.Trim & "|" & Me.txtProductSN.Text.Trim Then
' Exit Sub
'End If
'Session("LastValue") = Me.txtPlateNo.Text.Trim & "|" & Me.txtProductSN.Text.Trim
Dim Cnn As New SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("Cnn")) '"Data Source=Dbserver;User Id=sa;Password=;Initial Catalog=YsMis") )
Dim Cmd As New SqlCommand()
Dim ResultReader As SqlDataReader
Try
Cnn.Open()
With Cmd
.Connection = Cnn
.CommandType = CommandType.StoredProcedure
.CommandText = "ChaiBan"
.Parameters.Add("@fPlateNo", Me.txtPlateNo.Text.Trim)
.Parameters.Add("@fProductSN", Me.txtProductSN.Text.Trim)
.Parameters.Add("@fUserNo", Session("User").ToString)
ResultReader = .ExecuteReader
While ResultReader.Read()
Select Case ResultReader.GetString(0).Trim.ToUpper
Case "OK"
Me.lblMsg.Text = "拆版完成,请继续..."
Me.lblProductSN.Text = ResultReader.GetString(1)
Me.lblModel.Text = ResultReader.GetString(2)
Me.lblSpec.Text = ResultReader.GetString(3)
Me.lblCnt.Text = ResultReader.GetInt32(4)
Me.lblWeight.Text = ResultReader.GetInt32(5)
'Me.txtPlateNo.Text = ""
Me.txtProductSN.Text = ""
Case "NoPlate".ToUpper
Me.lblMsg.Text = "查无此板号!"
Me.lblProductSN.Text = ""
Me.lblModel.Text = ""
Me.lblSpec.Text = ""
Me.lblCnt.Text = ""
Me.lblWeight.Text = ""
Case "NotPlateProduct".ToUpper
Me.lblMsg.Text = "此塑盘和托板不匹配!"
Me.lblProductSN.Text = ""
Me.lblModel.Text = ""
Me.lblSpec.Text = ""
Me.lblCnt.Text = ""
Me.lblWeight.Text = ""
Case "NoProductSn".ToUpper
Me.lblMsg.Text = "查无此塑盘条码!"
Me.lblProductSN.Text = ""
Me.lblModel.Text = ""
Me.lblSpec.Text = ""
Me.lblCnt.Text = ""
Me.lblWeight.Text = ""
End Select
End While
ResultReader.Close()
End With
Catch Ec As Exception
lblMsg.Text = Ec.Message
Finally
' Cmd.Dispose()
Cnn.Close()
End Try