2010-07-14 24 views
0

我有兩個aspx頁面。第一個具有兩個隱藏輸入字段,因爲這:在vb.net提交頁面上接收到文本框中的值

<input id="ad" name="ad" type="hidden" value="<%=Request.QueryString("ad") & "" %>" /> 
<input id="bd" name="bd" type="hidden" value="<%=Request.QueryString("bd") & "" %>" /> 

現在,當這個土地上的下一個頁面上,我需要拿起這些價值,所以基本上:

dim a1 as integer = 0, b1 as integer = 0 
a1 = ad.value 
b1 = bd.value 

我是新來的這,有人可以幫我解決這個問題嗎?

回答

0

在發送值的頁面的代碼文件中,聲明全局變量,然後在提交中,將變量的值設置爲表單上輸入的值。

然後,在接收信息的頁面,請執行下列操作:

Public Class Page2 
Public Page1 As Page1 ' This is the global declaration that allows you to get values from the previous page 
Public a1 As Integer = Page1.a1 
Public b1 As Integer = Page1.b1 

HTH

相關問題