I'm trying to pass the content in my Webpage A, textBox1 to WebpageB, textBox2 by clicking a button at Page A, but failed to do so.
my code as follow :
Page A
TextBox
<td class="auto-style4">
<asp:TextBox ID="TextBox1" runat="server" Height="179px" TextMode="MultiLine" Width="282px"></asp:TextBox>
</td>
Button
<asp:Button ID="Button1Paste" runat="server" PostBackUrl="~/PageB.aspx" Font-Bold="True" ForeColor="Black" Height="41px" Text="Submit Content To Page B" Width="195px" OnClick="Button1Paste_Click"/>
protected void Button1Paste_Click(object sender, EventArgs e)
{
}
Page B
<asp:TextBox ID="TextBox2" runat="server" Height="150px" TextMode="MultiLine" Width="240px"></asp:TextBox>
protected void Page_Load(object sender, EventArgs e)
{
TextBox2 = (TextBox)(PreviousPage.FindControl("PageA"));
}
The content in Page A failed to pass to Page B, can anyone help to suggest a way to fix this? Thank you!