form's action do not refers to another page but to itself.

  • Thread starter Thread starter Behzad
  • Start date Start date
B

Behzad

Hi all,

I have a index.aspx as my home page and there is a form in the page as
follow

<form id="form1" runat="server" action="Login.aspx" method="post">
//some stuff
<form>
as you can see action attribute refers to login.aspx.When page renders
the action attribute refers to index.aspx.

I tried to solve the problem by ptting runat="server" attribute in all
div elements but the problem stil remains.
What do you think?
Please give the right solution.

Best Regards,
Behzad
 
Please give the right solution.

What are you trying to do, exactly...?

By default, ASP.NET forms post back to themselves - this is where you would
do any server-side processing...

If you then want to go to another page, use Response.Redirect(..........,
false);
 
Hi guys,
This is my first ASP.net project!

Seems there r so many things to learn! I had a good knowledge of
classic asp but for asp.net i have to learn more!

Thanks for you kind replies.
 
Back
Top