asp.net中使用PostBackUrl,后如何获取上一页的值

a.aspx

<asp:RadioButtonList ID="Test1" runat="server">
<asp:ListItem Value="1">test</asp:ListItem>
<asp:ListItem Value="2">tttt</asp:ListItem>
</asp:RadioButtonList>
      <asp:Button ID="Button1" PostBackUrl="~/JSpell.aspx" runat="server" Text="Button" /> 

b.aspx.cs

    RadioButtonList my = (RadioButtonList)this.PreviousPage.FindControl("Test1");
   [1]. Response.Write(my.SelectedValue);
   [2]. Response.Write(Request.Form["Test1"]); 

 

你可能感兴趣的:(asp.net)