Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
Post Array using window.location.href in ASP.NET MVC

I need to send data to a Controller to Post data currently I'm not using a form only I need to send an array for parameters, what is the right way to do it ?now I'm using this line of code but I know that it is used for Get method instead of Post method:

 window.location.href = "@Url.Action("Edit", "PurchaseOrder")?arr"+urlParams;
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

the only easy way to post data to a controller is to do it through a form. but that doesnt mean the form needs any text input or stuff like that as long as code the data in and you make it invisible for a user you can just use a button that looks like a normal button but is actually a form in de code.

else if you dont want to use a form to send the data even if the inputs on the form are not visible you could use AJAX to send a post request but i dont think you want to do that.

if you are already getting the data from a different page in my oppinion it would be easier to just use sessions to store the values when you get them for the first time

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!