asp.net mvc2 form post keeps extending the browser url -


I am trying to asp.net mvc2. I have a controller and search called Search Controller. Search is a view folder with search I have in my controller:

  [AcceptVerbs (HttpVerbs.Post)] Public Actions Post () {HPSLucene.Models.Arbitrary arb = new HPSLucene Models.Arbitrary (); Arb.Title = "Receive the post"; See Return ("Search", Arc); }   

I think I have:

   & Lt; / Form & gt;   

This works for the first time when I click on the button, and shows the browser URL. However, when I change the browser URL for the second time and I get 404 buttons then click on the button. What am I doing wrong? Thanks a lot.

You should / at the beginning of your action URL.

Why not asp.net deal with it for you and use:

  using ;% (Html.BeginForm ("Post", "Search ")) {%> & Lt; Label & gt; & Lt;% Response.Write (Model.Title); % & Gt; & Lt; / Labels & gt; & Lt; Input type = "submit" value = "first" name = "submit button" /> & Lt;%}% & gt;   

Which of you

  & lt; Form action = "/ search / post" method = "post" & gt;    

Comments