Asp.Net MVC - Odd Form / Controller issue -


I have a very strange problem with ASP.Net MVC.

I have a form, which is to post 3 text value in an action method that has been created (for the sake of simplicity, to say this);

  Public Action Result CntUuser (String First Name, String Lastlamem, String Email) {var s = First Name + Last Name + Email; Return Redirect Action ("Index"); }  

Also say that using my form

  & lt;% (HTML.biz form ("Continuoso", "user")) {%> & Lt;% = Html.TextBox (("first name"))% & gt; & Lt;% = Html.TextBox (("LastName"))% & gt; & Lt;% = Html.TextBox (("Email"))% & gt; & Lt; Div & gt; & Lt; Input type = "submit" value = "submit" /> & Lt; / Div & gt; & Lt;%}% & gt;  

Now in my verb method, on user control, first name, last name and email are all empty!

However, if I copy the same method in the second controller (game), and update the form to post there, the value in the method is not zero! I am completely stumped with this one

EDIT: These two controllers are the same - they are in the succession of the same base class, they have the same features as applicable to them.

EDIT: This is working (not sure what the underlying problem was).

I had a custom feature on my index method on user control (it essentially parses HttpContext.Current.User.Identity.Name property and passed it automatically in the method is). For some reason, this index was problematic on the method, once I had removed it, everything was started!

This was my index method first:

  [authorization] Public Action Index (String Username) {...}  

And

  public action index () {...}  

By the sounds of things (when you turn it into a controller, then it works) then perhaps the 'user' will have to do with some type of reserved word.

This little bit

Yes, change your controller somewhat differently.

HH, Charles

>

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -