asp.net mvc - .Net MVC Razor submit form post action -


i have html form like:

 <html>     <head>         <meta name="viewport" content="width=device-width" />         <title>index</title>     </head>     <body>         <form name="mercform" action="http://someurl.com/" method="post">              <input type="hidden" name="some_input" value="206">                          <input type="submit" value="sub" />         </form>     </body>     </html> 

when post form clicking submit button, new window opens posted values. but, want implement same form mvc razor page. habe tried code failed. new window not open.

@using (html.beginform("http://some url.com/","somecontroller", formmethod.post, null))         {                                <input type="hidden" name="some_input" value="206">                                     <input type="submit" value="sub" />                 } 

how can make work?

as know html.beginform not take 1st argument url, should action name.

if want post form data third party web site collect data inside action directly , process form post using httpwebrequest.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -