If I wanted to display a loading page while some script was running, how would I go about it?
It seems that a view is rendered when the controller's code has finished executing, but I need there to be something displayed to the user as the code is doing a fair amount.
Thanks for any pointers.
...
I have some checkbox that looks like this
<%= Html.CheckBox("Remember") %>
<%= Html.Label("Remember", "Keep me signed in for two weeks.") %>
This is in a form. So when it goes to my Action Method I just have a form Collection variable. Now I try to do
frmSign["Remember"];
So I tried to convert this right away to a Boolean and t...
Hi,
I'm trying to initialize a jQuery call with some parameters, but I don't know how to access them.
Now I have:
// Controller code
public ActionResult Offer()
{
...
ViewData["max"] = max;
ViewData["min"] = min;
...
return View(paginatedOffers);
}
// View Code
script type="text/javascript">
$().ready(
function() {
//...
Hello,
I would like to extend ASP.NET MVC's TextBox so it conditionally switches its CSS value (based on data from the Model). However, I don't want to put that logic in my view (by conditionally changing htmlAttributes/via method call there), but instead extend the class so I don't clutter my view. Basically I want the TextBox on creati...
Hello
I have a problem with inserting a list of int's to an object. The controller looks like:
public ActionResult Edit(int productID)
{
//ProductEditViewModel pm = new ProductEditViewModel();
Product product = _pr.GetProducts().ByProductID(productID).First();
product.Categories.Load();
//ICollecti...
Hello,
I have a fairly clean ASP.NET MVC project structure. However, I'm struggling on how to organize the mass of classes which are DTOs (data transfer objects), e.g. just to encapsulate post data from forms (viewmodels) but don't represent full domain objects or anything near that yet; and then the many "result" objects I have which c...
Hello,
I'd like to implement some kind of automatic "logging" in my ASP.NET MVC application when a page execution (incl. database calls etc.) takes longer than 3 seconds, and then gather some 'circumstantial evidence', e.g. which action was called, what the parameters were, session information etc. so I can then store that info for revi...
is there anyway to do this? if so what would the controller code look like to point to a specific html file instead of a MVC View?
...
I am castle Windsor and it works great for controller constructors in passing in the repository that is being used.
private IStoryRepository Repository;
public StoryController(IStoryRepository Repository)
{
this.Repository = Repository;
}
Now I have an Action that is in the admin area to display the main admin ...
I'm looking at implementing a Facebook-style thumbnail creator using ASP.Net MVC but haven't a clue where to start.
The feature in question is most easily-recognised when you upload a new profile picture. After uploading the image, you are presented with a frame that you can drag around the image to select the area that will appear as ...
About a week ago I saw a blog post describing how you could write a set of shared Views in the Views/Shared folder that could be used by all your Models. The post also explained how to decorate the Model properties with validation rules and messages. There was information about the new Model Binding improvements. The examples take advant...
Hi
I've installed MonoDevelop and latest version of Mono itself. But i still can't install MVC add-in since i have a dependency conflict: Core v2.0, Code.Gui v2.0 etc. But my repository http://go-mono.com/md/2.1.0/main.mrep doesn't contain ANY updates.
Is there any way to find the WORKING repository?
Thank you!
...
I have a simple ASP.Net MVC View which contains an FCKeditor text box (created using FCKeditor's Javascript ReplaceTextArea() function). These are included within an Ajax.BeginForm helper:
<% using (Ajax.BeginForm("AddText", "Letters",
new AjaxOptions() { UpdateTargetId = "addTextResult" }))
{%>
<div>
<input type=...
In Visual Studio when you add a new controller to your MVC application some macro creates a file with methods like:
//
// GET: /Thing/Details/5
public ActionResult Details(int id)
{
return View();
}
I want my methods to look like:
/// <example>GET: /Thing/Details/XXX...</example>
public ActionResult Details(Guid id)
{
return...
I running an application that have a proper error handlers. When testing in dev environment all works fine, error pages are displayed properly.
However when moving the same code to the production IIS is catching error pages and substitutes them with its own.
The problem is described here.
I just wonder is there a way to write this sett...
I am working on an ASP.NET MVC application and using jQuery.
I understand from various web resources that I should:
Reference the google CDN for loading jQuery library. (No problem with that)
Combine, minify and compress my javascript files into one file.
NOT write JavaScript code in view files.
Now the problem is that on different ...
Hi, is there some elegant way, ideally with jquery plugin like pager 1 or pager 2 how to implement paging with asp.net mvc? I am trying to go over partial views, but so far unsucessfully. Where should I store the loaded grid data? And how to respond on the page selection with just a partial refresh?
Thanks in advance.
...
Hi
I'm looking into ASP.NET MVC, and whether or not to make the switch. One thing that I do a heck of a lot in ASP.NET, is to render HTML on AJAX callbacks and sent back to the client. I use a generic ViewManager for rendering User Controls.
I created a sample MVC App from the templates, and was looking for the RenderUserControl method...
If you don't want any context or an example of why I need this, then skip to The question(s) at the bottom!
In a bid to keep things tidy I initially built my application without JavaScript. I am now attempting to add a layer of unobtrusive JavaScript on the top of it.
In the spirit of MVC I took advantage of the easy routing and re-rou...
Currently I'm passing my domain objects to my views, and binding directly to them from POSTs. Everyone says this is bad, so I'm attempting to add in the ViewModel concept.
However, I can't find a way to do this very elegantly, and I'd like to know what other people's solutions are to not ending up with a very messy controller action.
t...