how to return a FileResult from a string in asp.net mvc
I need to write an action that will return a FileResult from a string ...
I need to write an action that will return a FileResult from a string ...
Hello, I have LogOn.ascx control which is located on master page site.master: <% Html.RenderPartial("LogOn"); %> This control contains form with email and password textboxed which is submitted to LoginController: public class LoginController : Controller { ... [HttpPost] public ActionResult Login(string email, string pas...
Im trying to use the example from this site to do client site validation. Im trying to use the html form tag instead of the "Html.BeginForm()" but doing that disables the client side validation. Does EnableClientValidation only work with Html.BeginForm. What is the difference? <%@ Page Language="C#" Inherits="ViewPage<ProductVi...
The current request for action 'Index' on controller type 'ContactController' is ambiguous between the following action methods: System.Web.Mvc.ActionResult Index() on type RX.Web.Controllers.ContactController System.Web.Mvc.ActionResult Index() on type RX.Web.Controllers.CustomControllerBase`2[[RX.Core.Model.Contact, RXTechJob.Core, Ver...
Hello How would a constraint for a route look like that needs to be in the format:yyyy-MM-dd hh:mm? especially with the space there? I got @"\d{4}-\d{2}-\d{2}" so far, but not sure about the rest How's it done? /M ...
When trying to refactor an existing asp.net-mvc application to use Turbine as an IoC I get the following result: MvcTurbine.ComponentModel.ServiceResolutionException Could not resolve serviceType 'CommonProject.Web.Shared.Controllers.SearchController' Source Object: at MvcTurbine.Unity.UnityServiceLocator.Resolve[T](Type type) The ...
I have a dropdown cell and after clicking on an item i want to add a row to a html table. I did this using javascript: (addRowToTable is a basic javascript function) <script type='text/javascript'> $(document).ready(function() { $('#locations').change(function() { if (this.selectedIndex != 0) { v...
I have a modal dialog box which would open onclick of a link in the page. From the js now i would need to send some values to the Controller. But I cannt use form from where I can submit those values back to controller. Are there any other way of doing this or am I talking insane?? ...
We have an ASP.NET MVC 1.0 application that we use to host RESTful web services for some clients. These services all return XML that is built from ViewPage files (each client has their own set of custom formatted XML views but they all use the same controllers, models, etc.). There is a new web service that needs to write its XML to ou...
I've got an MVC app that gives the user textarea's to update some description fields. It's strongly-typed to a table object, and the fields are wrapped in a form with a Submit button. Occaisionally they don't want any data in a field, but when they delete the text and try to save, the blanked-out field comes back with its original text ...
Good Morning, Has anyone attempted to convert/migrate an ASP.net MVC web application project to ASP.net web forms? If so, how did you accomplish this? Thanks, Sid Clarification/Update: The server is running IIS6 and I've modified global.asax. I followed Phil Haack's instructions on setting up IIS6 for use by MVC. I can now view the ...
Hi, I am trying to create a custom HTML Helper that encapsulates some presentation logic because I have to reuse this logic a few times on the same page and maybe in the future. If the user's address is in North America, then I want two text boxes to be displayed for the telephone number input, one for the area code and the other for t...
Hi all, I'm using Visual Studio 2008 and ASP.NET MVC 1. I have a View where i open another View in a modal popup using fancybox. In this popup users can edit some data. It works great and the data is presented by the modalpopup, but when i click on the save button, the parent window changes to the modal popup content. <script type="te...
I have a ArticleController that displays a list of articles according to a category. public ActionResult List(string categoryname) { MyStronglyTypedViewData vd = new MyStronglyTypedViewData(); DBFactory factory = new DBFactory(); categoryDao = factory.GetCategoryDao(); articleDao = factory.GetArticleDao(); ...
Hi I am having an issue where i am trying to use JQuery to populate a div tag using the load function on a asp.net MVC website. I am calling a partialview through a controller and it works fine when i call it directly in the browser but when i try to call it through jquery i get an exception. My partial view uses the sessionstate to ob...
This question is being based off of a similar question titled, "ASP.NET MVC Relative Paths", located here. I understand that issues arise concerning absolute and relative paths when developing an ASP.NET application...especially an ASP.NET MVC application. Throughout the application lifecycle, I've been using something similar to the fo...
I want to create a class, that is flexible so I can switch implementations. Problem: Store files/documents Options: either store locally on the server filesystem, database or etc. Can someone help with a skeleton structure of the class, and how I would call it? I am not using an IoC, and don't really want to just yet. I just want the...
I want to create a templating engine which sits on top of the asp.net webforms view engine. This is a bit of a shim to simplify an existing XSL based architecture. Instead of using XSL stylesheets, I'll use views. Essentially an end user will create a template by submitting aspx view code to my application. I would like to compile that v...
I have a mvc web site that contains one non-mvc page (it is using ajax and java-script, so mvc is not a good option). The problem is that I still want to use the same masterpage. If I set the masterpage (MasterPageFile="~/Views/Shared/Site.Master"), then I get this error: Runtime Error Description: An application error occurred on ...
Here where I work I am trying to get the MVC framework accepted as the framework to use moving forward. The boss is quite keen to move forward but thinks it's a huge risk to take given I'm the only one that knows the framework. I've sent multiple emails out about training sessions, and put my hand up in many a meeting for again trainin...