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

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
 
M

Mark Rae

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);
 
B

Behzad

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top