actionresult
How to limit access to an [HttpGet] ActionResult in ASP.NET MVC?
Imagine I have an ActionResult like this: [HttpGet] public ActionResult Cities(string q) { //Return a list of cities that matches parameter[详细]
2023-01-16 20:19 分类:问答Why is this code sending 0kb files to the browser?
here is the call... return new FileUriResult(\"application/octet-stream\", a.AssetPath, null); [note that I set content length to null because I don\'t know it (file is on another server)][详细]
2023-01-16 12:30 分类:问答"Default decoder could not decode result"
Here are the files - MXML: <mx:HTTPService id=\"score\" url=\"http://...score.php\" fault=\"mx.controls.Alert.show(event.fault.faultString)\"[详细]
2023-01-14 09:48 分类:问答onResult HTTPService
I have a HTTPService: <mx:HTTPService id=\"scoreService\" url=\"http://\" method=\"POST\" result=\"onResult(event)\">[详细]
2023-01-13 20:17 分类:问答Custom View Engine vs Custom Action Result
I have a scenario where the user have the option to click the button \"download\" and I should create a csv file, that contains history data, and then let the user save the file locally. As I haven\'t[详细]
2023-01-08 05:00 分类:问答After HttpPost, returning a View (ActionResult) when Model is not valid, the response has content type of application/json
I\'m running into a strange issue in more than one page of my ASP.NET MVC site.When I POST a form and the Model is NOT valid, I try to return the same view so that I can see the errors - however, inst[详细]
2023-01-07 19:22 分类:问答ASP.NET MVC Base Controller Function not firing when I need it to
I\'m noticing some behavior that I don\'t like, and I\'m wondering if this is normal. I\'ve got a BaseController that is Inheriting from Mvc.Controller, and I\'ve got a View function inside that is t[详细]
2023-01-05 09:06 分类:问答How to unit test an ActionResult that returns a ContentResult?
I want to unit test the following ASP.NET MVC controller Index action. What do I replace the actual parameter in the assert below (stubbed with ?).[详细]
2022-12-21 01:50 分类:问答Asp.Net MVC post action result
How do you set the result of an action result to use Post and not Get. I need to redirect the result to an external site that requires the data to be sent using the post method.[详细]
2022-12-17 04:19 分类:问答ActionResult redirect renders using ToString()
Using the following sample: http://www.west-wind.com/We开发者_JAVA技巧blog/posts/899303.aspx The following line...[详细]
2022-12-14 09:56 分类:问答