0

I am new to asp.net. So just learning everything step by step.

I have created a web project with the template. 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. I think this is possible with redireciton mechanism

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: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" />
Rasim Avci
  • 63
  • 9
  • 1
    Possible duplicate of [How to make (link)button function as hyperlink?](https://stackoverflow.com/questions/14034960/how-to-make-linkbutton-function-as-hyperlink) – Prashant Pimpale Mar 15 '19 at 13:39
  • That post tells teh reverse of what I want. It tells how to make a button a hyperlink, not a hyperlink to call a function. – Rasim Avci Mar 15 '19 at 14:17
  • You could use instead off input it will be easier to use – J.C Mar 15 '19 at 14:33

1 Answers1

0

Instead of redirect, I just used href as href="Default1.aspx"

Rasim Avci
  • 63
  • 9