【发布时间】:2009-12-29 19:20:58
【问题描述】:
Partial Class ClientCenter_UpdateSub
Inherits System.Web.UI.Page
Structure PInfo
Dim Name As String
Dim Surname As String
End Structure
Dim OldPInfo As New PInfo
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
'blah blah
OldPInfo.Name = Dt.Rows(0).Item("Name").ToString
OldPInfo.Surname = Dt.Rows(0).Item("Surname").ToString
end if
end sub
End Class
第一次加载页面时,我的结构已正确填充。
在 AJAX 回发之后,所有结构字段都设置为空。 (似乎又调用了Dim OldPInfo As New PInfo),但我最好问问SO专家。
无论如何,我在这里做错了什么?
【问题讨论】:
标签: asp.net vb.net data-structures partial-postback