跨页面传送

SendValues.aspx

<asp:TextBox runat"server" ID="tb1" Text="AMD"></asp:TextBox>

<asp:Button runat"server" ID="bt1" Text="跨页面传送" PostBackUrl="~/GetValue.aspx"></asp:Button>

 

GetValues.aspx.cs

Page_Load方法中

if(PreviousPage!=null)

{

  TextBox tb = (TextBox)PreviousPage.FindControl("tb1");

  if(tb!=null)

  {

    string str = tb.Text;

  }

posted @ 2011-09-08 11:34  绯色卡卡  阅读(155)  评论(0)    收藏  举报