Where are the latest ASP.NET MVC bits?
Are the latest bits for MVC the Preview 5 release? I've been out of the loop for a while and just wanted to make sure I had the latest and greatest. ...
Are the latest bits for MVC the Preview 5 release? I've been out of the loop for a while and just wanted to make sure I had the latest and greatest. ...
Hi folks As described in this post, I created an abstract base controller class in order to be able to pass data from a controller to master.page. In this case, I want to lookup a user in my db, querying for User.Identity.Name (only if he is logged in). However, I noticed that in this abstract base class the User property is always nul...
I have a View page which displays a dropdownlist and search button..when i click the search button it renders the data..even when i debug i can go to the action in controller..but when i press the button second time it throws this error anbd doesnt allow me to debug..i set breakpoint but no luck..any ideas? Server Error in '/' Applicati...
I don't know what I am missing, but I added Profile properties in the Web.config file but cannot access Profile.Item in the code or create a new profile. ...
I am confused as to when to create object instances or Static Helper classes. For example, if I call a method to update a data model and submit to database, i create an instance of the DataContext. What is the lifetime of that Datacontext and is it ok to create new instances every time there needs to be a new data updates? In my contro...
I started getting this error when posting the form back with Model Binder. To test the problem I reduced the postback to one string property of the model but i still get the overflow error. Can anyone suggest what would cause this? UPDATE The problem appears to be related to the property in the model that is a foreign key. If this key...
Of late, I've been hearing many good things about functional programming languages such as F#. Additionally [and unrelated], I'm also noticing MVC is starting to get a lot of exposure - perhaps since the introduction of Silverlight/WPF. I've never been one for jumping on a bandwagon without first doing my research - in fact it took me ...
I know this is probably really obvious, but I cannot figure out why I cannot pass a string argument to a controller like one would an int. e.g. //controller/action/2 public ActionResult Action(int someInt) { //somenumber != null } but when i pass a string in like this... //controller/Action/x9294kskw public ActionResult Action(strin...
This is somewhat asp.net MVC related only for example purposes but I was hoping to achieve something like this: new SelectList(ViewData.Model.Formats.ToList().ForEach(x => index + " - " + x.Name), "ID", "Name"); Basically trying to be smart and return "index" as a number 1 - n where n is the number of items in the list ViewData.Model....
My Controller class is decorated with an AuthorizeAttribute to protect the actions: [Authorize(Roles = "User Level 2")] public class BuyController : Controller { ... } Anytime an action is invoked but the user is not in at least the role "User Level 2" he is automatically redirected to the login page with a url like this: http://...
I'm building a questionnaire mvc webapp, and i cant figure out how to pass an unknown number of arguments to the controller from the form. My form is something like: <% using (Html.BeginForm()) { %> <div id="Content"> <% foreach (var group in ViewData.Model.QuestionGroups) { %> <div class="Group"> <%=group.Des...
Which should I use? <input type="hidden" name="first_name" value="<%= person.first_name %>" /> or <input type="hidden" name="first_name" value="<%= Html.Encode( person.first_name ) %>" /> ...
With LINQ-to-SQL in a ASP.NET MVC website I can display objects (records) from my database table. Now I would like to create a new object and save it back to the database. In my Controller, I do this: var dataContext = new MessageDataContext(); Message message = new Message(); message.Action = "save"; message.Body = "r...
I am asp.net-MVC using the BeginForm syntax in my source ciew page and I was told if you want the form to submit you have to have the submit Button at the end of the using statement. I don't want to use a Button to call the desired Action I have an Actionlink set up like so: <%=Html.ActionLink("" + CreateMore, "Create", "", new { @cla...
I have decorated my model using Metadata classes attached to my model classes via the MetadataType attribute. I have some use the Range attribute, Required attribute, etc. and some custom attributes I have created. Now I want to hook into the rendering engine (or whatever it is called) of the Dynamic Data framework and be able to chang...
I'm interested in providing a general "I'm making an ajax call" notification ... similar to how most of google's services have a little red loading notification when it's busy making a call. Is there a way of globally tapping into some event that I can use to show/hide that notification if there is an active call? We're not using the j...
Ok, I'm an MVC newbie coming from a webforms background, so please excuse any ignorance here. Here is my scenario. I've got a table consisting of a list of applications and associated permissions. Each table row consists of 3 pieces of information: a checkbox, some text describing the row, and a dropdown list allowing the user to select ...
I trying to export an HTML table named Table that is dynamically binded to ViewData.Model in C#. I have a method called export that is called based on another method's actions. so everything before that is set up.. I just don't know how to export the data to a CSV or Excel file.. So when the I step inside the Export method I don't know w...
The complete warning is Validation (): Element 'html' occurs too few times This is for a JSON view, which you might guess returns a JSON result and hence no html. ...
Could anyone can tell me where I can find full ASP.NET MVC beta documentation? ...