I have strong opinion that Controller MUST NOT acceess Request.Form anyway this is interface.
Are you saying that you think using Request.Form is always to be avoided?? I hope not. How would you handle form posts with several textareas and file uploads for example?
I think in Most of cases. Code that handle TextAreas must be extracted to transport level. If we do it in ControllerAction we add one
Extra responsibility to this method and increase his complexity.
I have controller with simple and testable signature. I write controller and than view not the contrary
I think the issue here is whether you use GET or POST. In this case, for testing, you can mock the Request.Form collection as needed. I'd like to keep this thread on-topic, if you want to move this discussion to a new thread that would help.
Did your question get answered with regards to checkboxes?
I think the issue here is whether you use GET or POST. In this case, for testing, you can mock the Request.Form collection as needed. I'd like to keep this thread on-topic, if you want to move this discussion to a new thread that would help.
Yes i can, but not want. this way increase complexity both tests and code. Also this create hidden dependecies. I agree that this can be moved to new thread. I will enjoy in this topic. But not for me. I Just want to MVC Framework be best framework after
final release. [;)]
robconery
Did your question get answered with regards to checkboxes?
More or less. i got that this is current behivior of CTP version.
mogadanez
Member
73 Points
49 Posts
Re: [BUG]Value from checkbox do not handle as parameter
Dec 24, 2007 08:31 PM|LINK
I think in Most of cases. Code that handle TextAreas must be extracted to transport level. If we do it in ControllerAction we add one Extra responsibility to this method and increase his complexity.
if we have many or complexity form fields we can use something like ( took from http://hammett.castleproject.org/?p=229 ):
[ControllerAction]
public void Create([FormBinder] Product product)
but anyway not inside ControllerAction.
robconery
Participant
852 Points
195 Posts
Re: [BUG]Value from checkbox do not handle as parameter
Dec 25, 2007 05:33 AM|LINK
I think the issue here is whether you use GET or POST. In this case, for testing, you can mock the Request.Form collection as needed. I'd like to keep this thread on-topic, if you want to move this discussion to a new thread that would help.
Did your question get answered with regards to checkboxes?
mogadanez
Member
73 Points
49 Posts
Re: [BUG]Value from checkbox do not handle as parameter
Dec 25, 2007 06:16 AM|LINK
Yes i can, but not want. this way increase complexity both tests and code. Also this create hidden dependecies. I agree that this can be moved to new thread. I will enjoy in this topic. But not for me. I Just want to MVC Framework be best framework after final release. [;)]
More or less. i got that this is current behivior of CTP version.