What is a good way to persist querystring values in asp.net mvc?
If I have a url:
/questions?page=2&sort=newest&items=50&showcomments=1&search=abcd
On paging links I want to keep those querystring values in all the links so they persist when the user clicks on the "next page" for example (in this case the page value would change, but t...
For months, I've been considering downloading Microsoft's express web platform and learning ASP.NET, which I might actually enjoy, seeing as I already do web work with PHP, but am much more comfortable with C#.
However, the primary reason I don't want to do this is that I've always associated ASP.NET with useless spaghetti HTML. The li...
I've been toying with the SimplyRestfulRouting assembly that comes with the MvcContrib extras, and for the most part I really like that it quickly sets up my routes and leaves me with a good convention to follow in my controllers. However, I'm still trying to wrap my head around REST as it applies to rich internet applications and occas...
I'm designing an ASP.Net application that must support 'SubSites'.
The idea is to have a super admin manage all users, global application settings and SubSites. Each Subsite has a few of its own settings (such as a local admin, logo and welcome message) and each SubSite has its own list of registered users.
This is very similar with...
As an extension to this question here Linking JavaScript Libraries in User Controls I was after some examples of how people are concatenating and minifying JavaScript on the fly OR at build time. I would also like to see how it then works into your master pages.
I don't mind page specific files being minified and linked inidividually as...
I can't seem to find a good blog post that shows how to bind a model to a view without the magic strings "ViewData" (using a strongly-typed view is the approach I'm trying to take)
Does anyone know what I need to alter in the below to bind this directly to my model?
View
<%@ Page Language="VB" MasterPageFile="~/Views/Shared/Site.Maste...
I have noticed what Html.BeginForm() method encodes supplied routeValues into action attribute of FORM tag. This works well with POST method. But if method is GET all parameters in action URL are stripped by browser (tested on IE8 and Firefox 3.0.7).
For example, this code in view
<%
using (Html.BeginForm("TestAction", "TestControl...
Hi everyone,
I am using ASP.NET mvc, and DataDynamic ctiver Reports for .NET 3.0 as my reporting engine.
I have designed my reports and it warks fine on Visual Studio Development Server. But when I deploy it on my IIS (5.1 on Winxp SP2), I have propblems with AdobeAcrobat reports viewer and chart reports. IIS returns an error:
[NotSu...
Was it my imagination or did the earlier releases of ASP.net MVC have built in password retrieval?
I'm not seeing it in version 1.0
...
I want to use code beside files for my views in my ASP.NET MVC project. Is there any simple way in Visual Studion 2008 how to add a code beside file to the view?
Note: I know that code besides files are no preferred in ASP.NET MVC but my reason is that I want to give .aspx files to designer and don't want to confuse him nonHTML code as ...
I have a search page that if there is results in the list it passes this list to a view.
However if there are no results I want to send the searched text to a no results found view.
How would I go about this?
...
I am creating an ASP.NET MVC application that has postcode lookup functionality. I capture the postcode from the user send it to a web service and have an array of addresses returned. I wuold like to display the array of addresses in something like the jQuery UI Dialog. The user can then select the correct address which is returned and p...
Hi all.
I've got the following action:
public ActionResult Create()
{
var entity = new Employee();
TryUpdateModel(entity, new[] { "Person.Name", "Code", "CompanyID" });
if (ModelState.IsValid)
{
var result = Service.MergeEmployee(entity);
return RedirectToAction("List", new { success = true });
}
return...
I'm trying to create a strongly typed partial view
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Pt.Data.Services>>" %>
<table>
<% foreach (Pt.Data.Services item in Model)
{ Html.RenderPartial("ServiceItem",item); } %>
</table>
in Controller
IEnumerable<...
I am having an issue with caching the home page of my Asp.Net Mvc App.
All the other pages cache fine using the [OutputCache(Duration=60, VaryByParam="None")] action filter.
The problem is that the home page does not cache. I noticed that if I access the home page via Controller/Action ("Home/Index") then it caches but when accessed vi...
Hi, I have some questions on this topic.
Where do I get information about the currently connected user? That is, how does shibboleth pass the information?
Can I set some restrictions on actions using [Authorize] attribute based on data acquired from shibboleth?
Thanks in advance.
Trimack
...
I have been looking at many ASP.Net MVC client side validation ideas including xVal. This doesn't provide a ValidationSummary at the moment so I chose to do an AJAX post which loops through ModelState errors and update a DIV with the error messages on a successful AJAX post.
The problem with this is your ValidationMessage * next to t...
I'm trying to work out if there's a built in way in ASP.NET MVC to assign the form values that are POST'd back to the properties of the ViewModel that was originally sent to the View?
So I'm thinking along the ideas of decorating some of the properties in the ViewModel with an attribute and then reflecting over the ViewModel and using t...
let say I have this url:
http://myweb/item/info/1
with a link to
http://myweb/item/edit/1
and I don't want the user to manually change to
http://myweb/item/edit/2
I would want the user to click on the link from the info page so he can access the edit page.
how would you manage that?
...
I am having a problem where I try to open my ASP.NET MVC application but I get the ASP.NET error page which says this:
**Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily un...