http - Dot net core action="." refers to controller but not action -


i have controller named casescontroller in turn contains following method:

    [httpget("cases/active")]     public iactionresult getactive()     {         return view("caselist", _caserepository.getall());     } 

additionally caselist.cshtml file contains following form:

<form class="form" method="get" action="."> </form> 

(in reality, form in partial view rendered caselist view , want use same partial couple of different controller methods). form used get original page filter parameters limit number of records shown.

i expect form post //server/cases/active?formfield1=&formfield2= instead, method name left out of url get sent to: //server/cases/?formfield1=&formfield2=

how can browser recognize full path url produced page?

if want url same page on without query string instead of period (.) need use question mark (?) or leave blank. example, assuming on page url http://www.example.com/path/thing?value=1, destination actions calculated this:

.   =>  http://www.example.com/path/?form=1 ?   =>  http://www.example.com/path/thing?form=1 

note: not defined anywhere. example, might find different browsers give different results. it's quite bad practice not specify action url.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -