c# - MVC Issue with Model appearing in Query String -


i have built mvc 5 application dynamically loads child applications dlls. works expected somewhere along way, noticed models started appear represented in query strings despite using post.

they appearing this:

http://localhost:64921/access/lookupuser?pagemodel=accesschecker.app.models.userlookup

while expect them appear this:

http://localhost:64921/access/lookupuser

unfortunately had put side project time , getting it. know before put down, attempted rebuild portion of application trying tack issue down , did not come across cause of it.

because routes dynamically generated, cannot show snippet of code, here route url values (in order @ runtime):

"__browserlink/requestdata/{requestid}"

""

"api/{controller}/{id}"

"{resource}.axd/{*pathinfo}"

"{controller}/{action}/{id}"

"cas/{controller}/{action}/{id}"

"app1/{controller}/{action}/{id}"

"app2/{controller}/{action}/{id}"

"app3/{controller}/{action}/{id}"

"access/{controller}/{action}/{id}"

my controller action looks this:

    public actionresult lookupuser(userlookup lookupmodel, formcollection formdata)     {         userlookup ul = null;         ...         return view(ul);     } 

the form in view looks this:

@using (html.beginform("lookupuser", application.applicationprefix, new { pagemodel = model }, formmethod.post, new { id = "lookuparea", @class = (model.memberships.count > 0 ? "loadedwithcontent" : ""), role = "form" })) {     ...             <input type="submit" id="submit_btn" value="lookup" />     ... } 

on top of numerous other attempts, have tried taking out default routes, moved "{controller}/{action}/{id}" end, taking out extraneous routes, removed ", formcollection formdata" , plenty of things have long since forgotten. url comes application_beginrequest in global.asax.cs has model on it.

i have rewritten or extended significant portions of mvc framework enable dynamic content dlls, security checking or error redirection, have portion of or simple form parameter or route order (even though attempted check that).

any guidance on narrow down scope of or insight can cause appreciated.

stephen's recommendation above corrected issue (which seeing trees through forest).


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -