why does .NET replace my form action?

Results 1 to 2 of 2

Thread: why does .NET replace my form action?

  1. #1
    Join Date
    Dec 1969

    Default why does .NET replace my form action?

    this is the code i have in my home.aspx:<BR><BR>&#060;form action="newlist.aspx" runat="server" method="post"&#062;<BR>&#060;asp:textbox id="newlist" name="newlist" runat="server"/&#062;<BR>&#060;asp:button text="go &#062;" name="btnSubmit" onclick="btnSubmit_OnClick" runat="server"/&#062;<BR>&#060;/form&#062;<BR><BR>when i run the page on my webserver and look at the source code, my form action has been replaced by "home.aspx" (the file itself) instead of "newlist.aspx". this is probably a very basic question but i just started out programming in asp.net and was trying to make a simple form that posts to a next page. thanks, nicolas<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: why does .NET replace my form action?

    Because in the new .net world you are being pushed in the direction of posting back to the same page, which is the smart thing to do. If you really want to post to another page (which I also discourage) then take out the runat="server".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts