看板 Web_Design 關於我們 聯絡資訊
<form method="post" target="_self" action="B.aspx"> 表單的 target 屬性若設為空白,則 action 到 B.aspx 時,可取得表單內欄位值; 但若設為"_self",則 action 到 B.aspx 時,無法取得表單內欄位值; 煩請各位大大解惑。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.138.32.63
nobody1:一般不會設target 11/03 15:01
hulanpei:寫這麼多年,我也是第一次用,真的有需要 11/03 15:08
nobody1:傳值用別的方法吧 11/03 15:14
iceyang:Cross Page Postback 11/03 16:37
hulanpei:回n大,要傳的資料很多,form是目前想到最好的方法 11/04 10:31
hulanpei:回i大,這兩種做法我都是用Cross Page Postback 11/04 10:32
iceyang:不知道妳所說的作法是怎樣 我剛稍微測試了一下 11/04 15:21
iceyang:無論有沒有定義 target PreviousPage都能正確抓到值 11/04 15:21
iceyang:但是.... 有什麼需求一定要設定 _self ? 不懂 = =" 11/04 15:24
hulanpei:我在B.aspx Response.Write(Me.PreviousPage Is Nothing) 11/05 11:21
hulanpei:沒設定target的顯示false,有設定target的顯示true 11/05 11:21