Hi @René ,
You find the actual path when you are using friendly url. So, I suggest you could use Server.Transfer. You could try to test use this demo.
Page1,named Test2:
<asp:Label ID="Label1" runat="server" Text="Company Name"></asp:Label>
<asp:TextBox ID="txtkey" runat="server"></asp:TextBox>
<asp:Button ID="cmdspichern" runat="server" Text="spichern" O nClick="cmdspichern_Click" />
Code-behind:
Protected Sub cmdspichern_C lick(sender As Object, e As EventArgs)
S erver.Transfer("~/Test3.aspx")
End Sub
Page2,named Test3:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
Code-behind:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim txtBoxtest As TextBox = CType(Page.PreviousPage.FindControl("txtKey"), TextBox)
TextBox1.Text = txtBoxtest.Text
End If
End Sub
You could check the microsoft article.
Best regards,
Yijing Sun
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.