Commit Graph

33 Commits

Author SHA1 Message Date
Henk Mollema 3ac6acdab4 Removed clear-text password from sample
Removed unused clear-text password as it encourages risky coding.

#1764
2015-04-17 13:58:48 +02:00
Ajay Bhargav Baaskaran db728cd386 Introducing TempData
- Issue #455
 - Updated MVC sample
 - Added relevant tests
2015-03-10 12:04:05 -07:00
Praburaj 698af6d1d3 Reacting to hosting API changes 2015-02-27 16:18:05 -08:00
Praburaj 3fc61eeac9 Introducing SkipStatusCodePagesAttribute attribute to disable StatusCodepages 2015-02-13 16:03:59 -08:00
Pranav K e1e43e1e8c ControllerActivator should be able to use controllers registered as
services

* Added WithControllersFromServiceProvider that replaces the default
  controller activator with a service based one.
* Move activation to DefaultControllerFactory
* Modify [Activate] behavior so that it no longer activates services. Use
  [FromService] attribute to hydrate services

Fixes #1707
2015-02-11 16:41:59 -08:00
Ajay Bhargav Baaskaran 437eb93bde File upload model binder
- Support for binding posted file to type IFormFile
- Support for multipart/form-data in FormValueProviderFactory
- Updated Mvc Sample
- Added relevant unit and functional tests
2015-01-15 13:41:14 -08:00
Doug Bunting 7eb106676c Add missing license headers
- #EngineeringDay
- license present but incorrect in just a few files
- skip generated files such as Resources.Designer.cs and files under
  test\Microsoft.AspNet.Mvc.Razor.Host.Test\TestFiles\Output
2014-11-20 22:54:05 -08:00
Doug Bunting 4bde6f6caf Add "/home/nulluser" view to MVC sample
- exercises display and editor helpers when `Model==null`
2014-10-27 16:25:48 -07:00
jacalvar a2023d35ee [Fixes #429] FileResult
1) Implemented FilePathResult to efficiently return files from disk.
2) Implemented FileStreamResult to return content from a stream.
3) Implemented FileContentResult to return content from a byte array.
2014-10-02 12:50:24 -07:00
Pranav K ad8ab4b8fd Adding support for ViewLocationExpanders to allow modifying view locations
without changing the view engine.

Fixes #1039
2014-10-01 16:15:25 -07:00
Pranav K a931e21456 Adding support for flush points in Razor pages
Fixes #1042
2014-08-29 09:30:23 -07:00
YishaiGalatzer e40dbcaebf Prevent flushing when writing out from the formatters.
Also make the XML formatter respect object as a return type.

Issues: MVC/1073, MVC/972, MVC/958

1072 is a followup work item to add test coverage.
2014-08-28 14:15:07 -07:00
Javier Calvarro Nelson 3ab0c3af29 [Issue #733] Attribute Routing: Implement Order
1. Added an Order property to IRouteTemplateProvider, ReflectedAttributeRouteModel,
   AttributeRouteInfo, AttributeRouteLinkGenerationEntry and AttributeRouteMatchingEntry.

2. Changed the implementation of AttributeRoute to take the order into account when routing
   incomming requests and generating links.

3. Ensured a stable ordering of route entries with the same order and precedence for route
   matching and link generation based on the template text.

4. Added tests to validate that the precedence gets respected in route matching and link generation.

5. Added tests to validate that the order gets respected in route matching and link generation.

6. Added tests to validate that the order gets respected over the precedence for route matching
   and link generation.

7. Added tests to validate that routes with the same order and precedence expose a stable ordering
   for route matching and link generation.
2014-08-14 11:21:05 -07:00
harshgMSFT 6ee034e64f ProducesAttribute +
Adding Functional Tests

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatter.cs
	src/Microsoft.AspNet.Mvc.Core/Resources.resx
	src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/project.json
	test/Microsoft.AspNet.Mvc.FunctionalTests/project.json

Adding Resources + tests

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs
	src/Microsoft.AspNet.Mvc.Core/Resources.resx

Adding produces content Attribute

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj
	test/Microsoft.AspNet.Mvc.Core.Test/Microsoft.AspNet.Mvc.Core.Test.kproj
2014-08-11 17:52:55 -07:00
harshgMSFT 927821a8ac Data Token support changes 2014-08-11 11:38:10 -07:00
Javier Calvarro Nelson b0d52f73fd [Issue #527] Revive common ActionResults - Part 1.
1. Added HttpNotFound() to Controller.
2. Updated HttpStatusCodeResult to expose the StatusCode as a property.
3. Added unit tests for HttpNotFound() and for HttpStatusCodeResult.
4. Updated the MvcSample to add an action that uses HttpNotFound().
5. Brought back HttpNotFoundResult and added unit tests for it.
2014-07-25 13:04:59 -07:00
Chris Ross 240d969899 Add using statement for extension methods. 2014-07-08 10:19:16 -07:00
Pranav K 59e419ba0a Adding support for @Inject to Mvc 2014-06-09 13:43:08 -07:00
Andrew Peters f13865dedc Updating copyright headers 2014-05-08 23:01:20 -07:00
dougbu 67b33868a3 Add `ListBox()` and `ListBoxFor()` helper methods
- copy from legacy MVC
- get `ListBox[For]()` methods in correct places and working
 - also usual stuff: `var`, `[NotNull]`, remove `IDictionary<,>` overloads
 - `ListBoxHelper()` -> `GenerateListBox`
 - already had all the bits needed in `GenerateSelect()`
- special-case `null` or empty `name` in GenerateSelect()
 - ensure `ArgumentException` has correct parameter name
 - lower-level problem affected `CheckBox()` as well
- use `ListBox()` and `ListBoxFor()` in MVC sample
 - use `ListBox()` in an editor template
2014-05-05 14:26:06 -07:00
N. Taylor Mullen 2ce4c56915 Fixed sample to not override User property.
#277
2014-05-02 15:24:45 -07:00
anpete 8208cd6b2f Update file headers 2014-05-01 17:42:33 -07:00
sornaks d63d998e95 Introducing DisplayText, DisplayTextFor, Id, IdFor, IdForModel.
Fixing CachedDataAnnotationsModelMetadata to support NullDisplayText.
2014-04-30 10:23:25 -07:00
sornaks 112a5ddc50 Changes enabling TextArea, TextAreaFor.
Changing the interface to directly include Rows and Columns.
2014-04-30 09:42:07 -07:00
Yishai Galatzer a5afd3eb42 ActionResult implements IActionResult, and all our default implementations now use ActionResult
All controller methods return the specific ActionResult type
2014-04-25 15:57:02 -07:00
dougbu 246bb2e3dd Add `DropDownList()` and `DropDownListFor()` HTML helpers
- copy over legacy MVC's `SelectExtensions`, `SelectListItem` and `SelectListGroup`
 - plus expected `SelectList` and `MultiSelectList`
- fixup select HTML helpers to meet WebFx standards and work in new world
 - usual stuff: `[NotNull]`, `var`, `String` -> `string`, long lines, ...
 - remove `IDictionary<string, object> htmlAttributes` overloads
 - move longest extension method overloads into correct classes / interfaces
 - add `ViewDataEvaluator.Eval()` overload for an `object` container
 - rename lower-level helpers to make purposes more obvious
 - nit: move Raw() methods up from bottom of HtmlHelper.cs
- use `DropDownList[For]()` in MVC sample
2014-04-14 16:05:07 -07:00
dougbu f0a97772f5 Add remaining HTML input helpers
- add `CheckBox[For]()`, `Hidden[For]()`, `Password[For]()`, and
  `RadioButton[For]()`
- also make `FormatValue()` visible to users, as it is in legacy MVC
- and spread the boxes out a bit in MyView 😺
2014-04-09 12:52:47 -07:00
N. Taylor Mullen 5dbd006165 Add sample for Display Html Helper.
Showcased a lot of the core pieces of Display in the sample.  Some pieces are still missing such as DataType handling.  The infrastructure is there to handle it in the TemplateRenderer but the model metadata providers do not construct the metadata with the data types.
2014-04-06 15:56:08 -07:00
N. Taylor Mullen dad87c5239 Add ValidationSummary helper.
This enables Html.ValidationSummary.  This is in reference to WEBFX-97.
2014-04-02 14:58:08 -07:00
dougbu 32d031c6eb Add `ModelMetadata` to `ViewData`
- demonstrate `ModelMetadata` is available in a view

Also
- simplify `View()` overloads in `Controller`, pending #110 decisions
- make `Model` in `RazorView<T>` readonly
2014-03-21 14:42:42 -07:00
David Fowler 930986d6a2 Migrate samples from hacky self host to helios
- MvcSample should be deleted and all new code should be written in MvcSample.Web
2014-03-14 10:25:13 -07:00
David Fowler 5ea11e396d Added first core clr enabled sample. 2014-02-15 01:20:32 -08:00
David Fowler 125ca080b5 Added a sample web project 2014-02-14 03:03:02 -08:00