Take the following hypothetical situation, how would I implement it in MVC?
All my pages sit in a Master, which has a CurrentUser property on it. This object is determined from some session user id, and then queried from the db on every page load. This object is then used throughout the site, for example to display "Welcome _" at the to...
In my asp.net mvc page, I want to call a RedirectToAction(actionName, controllerName, values).
The values parameter is an object that contains all the nessecary values.
Example
return RedirectToAction(redirectAction, redirectController,
new{ personId = foundId,
personEmail = foundEmail,
personH...
I have a simple function that I want to call in the code behind file name Move
and I was trying to see how this can be done and Im not using asp image button because not trying to use asp server side controls since they tend not to work well with ASP.net MVC..the way it is set up now it will look for a javascript function named Move but ...
I upgraded a large ASP.NET MVC application I've been working on to the latest beta today, and after some initial problems, I've got it mostly working again. The big problem is that I have things like this:
<%= Html.ActionLink("LOGIN", "Index", "Authorization", new { redirect=Request.Url })%>
and
<%= Html.ActionLink("Edit this page"...
Hello all!
I have an application for entering in serial numbers to a database. A serial number has a set number of attributes that defines it and the the user must/may provide them to generate.
public class Serial
{
public string Number {get; set;}
public string Part {get; set;}
public string MfgOrder {get; set;}
publi...
I have a central authentication application on server a. Server b has one or more applications on the same domain that need to authenticate from server a. It's easy enough to set it up so that the server b apps redirect out to server a. What's not so easy is getting the ReturnURL to be absolute.
Here's the wrinkle. Consuming app on serv...
Here is my scenario. For the example lets say that I need to return a list of cars based on a search criteria. I would like to have a single View to display the results since the output will be the same, but I need several ways of getting there. For instance, I may have a Form with a textbox to search by year. I may have another sepa...
I have an action filter attribute on a base class all my controllers inherit from. I want it (the filter) to work on all methods EXCEPT one. Can it be done? How?
...
I am working on ASP.NET MVC.
in order to use AjaxHelper, I inserted two javascript files in the site.master as following.
<script src="../../Scripts/MicrosoftMvcAjax.debug.js" type="text/javascript"></script>
<script src="../../Scripts/MicrosoftAjax.debug.js" type="text/javascript"></script>
then I used AjaxHelper in view pages, but ...
How to hide controller name in Url?
I use the ASP.NET MVC.
The original url is: http://www.sample.com/Users.mvc/UserDetail/9615
The "Users" is controller name, the "UserDetail" is action name, and the "9615" is UserId.
How can I hide the controller name and action name in the url.
Just like this: http://www.sample.com/9615
I have...
I am developing some ajax stuff on asp.net mvc framework beta.
but,I got exception as following.
Anyone has problem like me?
Sys.ArgumentUndefinedException: Value cannot be undefined.
and my source code is like this.
<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
<script src="../../Scripts/jquery-...
I have multiple controller actions that takes an id
public ActionResult Get(int? id) {
...
}
public ActionResult Delete(int id) {
...
}
public JsonResult GetJson(int? id) {
...
}
I'm thinking its best practice to use a ModelBinder (SomeObjectFromIDModelBinder) on each action, so the obtaining of the object is separated from the cont...
I have a new ASP.NET MVC project (my first), and I had been running fine with 1 controller, view, and model. After I added a new controller and view, my first view started throwing this error message when I try to run the project:
Description: An error occurred during the parsing of a resource required to service this request. Please re...
I need fire a filter method with all string in GET or POST value from http request before it was bind into controller action
Can i do it in Global.asax.cs? and if yes, can u give me more details or example (great) about this?
...
I need help with the best practice to localize asp mvc apps,
I saw Oxite having a base method named Localize in the BaseController, but is the Localization a task for the view or the Controller?
Or should I use resx files / or use db tables?
...
I have an interesting situation where I need to deploy an ASP.NET MVC app to a (pseudo-boss's) local desktop machine so they can run it locally for data entry purposes. What would be the best way to get the app running on a vista machine without Visual Studio installed?
Ideally, It would be a one click that started a development web ...
Is there a way to link to another View that displays search results without having to use a querystring? For example, I know that I can do the following:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(string txtOrderNumber)
{
return RedirectToAction("OrderLookup", new { controller = "Report", id = txtOrderNumber }); ...
Background
I have a page on my ASP.NET MVC web app for users to enter addresses into their address book. When the user enters in their address and clicks the submit button, the controller action that handles the form post then geocodes the address (retrieves latitude, longitude, and the full address in case the user forgot to enter in ...
I just went through some MVC tutorials after checking this site out for a while. Is it just me, or does MVC View pages brinig back HORRIBLE flashbacks of Classic ASP spaghetti code with all the jumping in and out of HTML and ASP.NET with yellow delimiters everywhere making it impossible to read? What ever happened to the importance of ...
I want to pass some parameters to my MVC UserControl like ShowTitle(bool) and the ViewData.Model.Row . How I define my usercontrol and pass them to it?
Tanx
...