可以WebForm1.vbPublic Class WebForm1
Inherits page
.......
Protected WithEvents dropdownlist1 As System.Web.UI.WebControls.dropdownlist
.......
Public ReadOnly Property OutParam() As OutExchangeCarrier
Get
Return dropdownlist1.selectedvalue
End Get
End PropertyPrivate Sub btnSubmit(ByVal sender As Object, ByVal e As System.EventArgs)Handles btnCancel_ExchangeCarrierExe.Click
Server.Transfer("WebForm2.aspx")
End SubWebForm2.vbPublic Class WebForm2
Inherits page
.......
.......
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim dropdownlistValue as string
Try
If Page.IsPostBack Then Return If TypeOf CType(Context.Handler, Object) Is WebForm1 Then
dropdownlistValue = CType(Context.Handler, WebForm1 ).OutParam
Else
Exit Sub
End If
Catch ex As Exception
End Try
End SubdropdownlistValue 的到的就是前一页面ddl的值
Inherits page
.......
Protected WithEvents dropdownlist1 As System.Web.UI.WebControls.dropdownlist
.......
Public ReadOnly Property OutParam() As OutExchangeCarrier
Get
Return dropdownlist1.selectedvalue
End Get
End PropertyPrivate Sub btnSubmit(ByVal sender As Object, ByVal e As System.EventArgs)Handles btnCancel_ExchangeCarrierExe.Click
Server.Transfer("WebForm2.aspx")
End SubWebForm2.vbPublic Class WebForm2
Inherits page
.......
.......
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim dropdownlistValue as string
Try
If Page.IsPostBack Then Return If TypeOf CType(Context.Handler, Object) Is WebForm1 Then
dropdownlistValue = CType(Context.Handler, WebForm1 ).OutParam
Else
Exit Sub
End If
Catch ex As Exception
End Try
End SubdropdownlistValue 的到的就是前一页面ddl的值
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货