简体   繁体   English

如何使用带有ASP链接的页面上的函数重定向到另一页面

[英]How to redirect to another page with using a function on that page with asp link

I am new to asp.net. 我是asp.net的新手。 So just learning everything step by step. 因此,请逐步学习所有内容。

I have created a web project with the template. 我用模板创建了一个Web项目。 On Page one, I have a button and a textbox with no action defined yet. 在第一页上,我有一个按钮和一个尚未定义任何操作的文本框。 On Page two I have a button and a textbox and I also have db connections works from the button. 在第二页,我有一个按钮和一个文本框,我也有按钮的数据库连接。

What I want to do is, if user writes something and click button on first page, I want to go page 2 and acts as clicked button. 我想做的是,如果用户写了些东西然后单击第一页上的按钮,我想转到第二页并充当单击按钮。 I want to run some action on page two with parameter from page on. 我想在第二页上使用参数from页面上运行一些操作。 I think this is possible with redireciton mechanism 我认为这可以通过redireciton机制实现

I will post the code here. 我会在这里发布代码。 can anyone help me . 谁能帮我 。 I may be wrong as I am new to this language. 我可能是错的,因为我是这种语言的新手。

I can do it with a button but I want to do it with a asp link 我可以用一个按钮来做,但是我想用一个asp链接来做。

<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="BringPage2" />

Right now this is a link but I want to make it a button 现在这是一个链接,但我想将其设置为一个按钮

<p><a href="http://www.asp.net" class="btn btn-primary btn-lg">Bring Page 2 &raquo;</a><input id="txtBoxAlan" name="txtBoxAlan" type="text" />

我没有使用重定向,而是将href用作href =“ Default1.aspx”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用javascript函数从asp.net页面重定向到另一个页面 - Redirect from asp.net page to another using javascript function 剃刀页面-如何使用asp-for标记帮助程序重定向到另一个文件夹的页面 - Razor Page - How to redirect to another folder's page using asp-for tag helper 将ASP页面重定向到另一个URL - Redirect an asp page to another URL 如何在asp.net的另一个解决方案中重定向到另一个页面? - How to Redirect to another Page in another solution in asp.net? 如何重定向到btnclick调用的函数中的另一个页面。 ASP.NET - how can i redirect to another page in function that called by btnclick. ASP.NET 无法使用 ASP.NET 和 WF 4 重定向到另一个页面 - Can't redirect to another page using ASP.NET and WF 4 如何使用 Z686155AF75A60A0EDD3F6E9D80C1 从 ASP.NET Controller 重定向到另一个 web 页面? - How do I redirect to another web page from an ASP.NET Controller using JavaScript? gridview 链接按钮重定向到另一个页面 - gridview link button redirect to another page 无法使用超级链接将用户重定向到另一个页面 - not able to redirect users to another page with hyper link 如何在ASP.NET中进行请求期间重定向到另一个页面 - How to redirect to another page during request in ASP.NET
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM