I am maintaining a session for user login.
Consider a scenario that, User working on page20 with his account credential.
He is idle for the session variable time out. Then he start working on page20 and click link of page21.Here session is expired so he'll redirect to Login page.
After successful logged in, User should redirect to the ...
This one has me stumped, and I think it might be a bug in Microsoft's MVC implementation. I am building a MVC website using VS2008 SP1. In an attempt to lockdown my website I edited my controller to look like this:
1 public class IdeaController : Controller
2 {
3 [Authorize(Users = "whozmom")]
4 public ActionResult Index(...
I am trying to use it for Login page.
if (Session["UserID"] == null)
Server.Transfer("/Account/Login", true);
But I get The Exception -> Error executing child request /Account/Login.
...
I've got a css file that i want to use to style my ASP.Net MVC web application.
I've included it in the solution however it doesn't seem to be taking any effect.
Have I missed something?
...
I'm having so many problems getting more than 1 MVC project up and running on the same server... I'm using a Windows XP system running the default IIS (5.1 I believe).
At this moment I'm even building WebSetup projects for every project I create to make sure everything goes well, while these projects could very easily be deployed using ...
By clever, I mean NOT TO upload once again the files that has been already uploaded (with the same dates, size or checksum...). It would be great, because the Publish method takes a lot of time!
...
hi,
maybe i am wrong but i seriously i don't like the current structure of MVC application, and i think on big projects it will cause trouble to maintain.
so is there a way to group related Controllers,Views, Models together, like if i have gallery Module i want all it's Controllers, Views, Models to be grouped under Gallery Folder.
...
I have no problems processing JQuery GET requests in a controller, however I cannot get any form data to POST. The following client snippet:
$.post(url,{name:"John"},function(result){
//process result
});
combined with a controller:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Save(string name)
{
return Json("Success!");
}
w...
I have an IDictionary, now I want to use these values in a selectlist. How do I do this?
Thanks.
...
In my ASP.net MVC application i need to get the host of the application because I have to distinguish between multiple domains/instances.
In consideration of a good design and testability I do not want to get it like this:
public ViewResult Show(int id)
{
string host = Request.Url.Host;
....
}
Is there a possibility to "inject...
I'm attempting to create a generic controller, ie:
public class MyController<T> : Controller where T : SomeType
{ ... }
However, when I try to use it, I'm running into this error everywhere...
Controller name must end in 'Controller'
So, my question, Is it possible to make a generic controller in asp.net mvc?
Thanks!
...
While trying to implement an MVC file upload example on Scott Hanselman's blog. I ran into trouble with this example code:
foreach (string file in Request.Files)
{
HttpPostedFile hpf = Request.Files[file] as HttpPostedFile;
if (hpf.ContentLength == 0)
continue;
string savedFileName = Path.Combine(
AppDomain.CurrentD...
I'm just starting a project in ASP.Net MVC with LINQ to Entities and I was wondering if there was a nice, clean way of defining models that creates the appropriate tables in the database for me. I'm most familiar with Django (in terms of MVC frameworks) and am looking for the .Net equivalent of models.py so I can have everything versione...
I am barely starting out with my first project on the ASP.NET MVC project type and I am creating a Details page where instead of passing the templated (int id), I would like to pass a string instead. But when I am in debug mode, and enter this in the URL, "myString" is null. Why so? Do I have to change anything else somehwere else?
S...
If you have a Model whose classes are not using LINQ, can you still somehow take advantage and use the IQueryable for use with paging in MVC?
...
I need recommendations on a good Unit Testing book for use with ASP.NET MVC. Based on books you have actually read and use (your bible), what do you recommend?
...
How suitable ASP.Net MVC for developing anything like
http://www.google.com/ig
I haven't seen or failed to find any examples yet. Does MVC approach imply that user interface is not supposed to look like that ?
...
I realize this question is a bit subjective but it seems like best practices are still evolving for ASP.Net MVC.
I went searching for examples on how to implement sub/partial views with their own controllers so that I could produce self contained widgets and I came across this article.
http://blog.codeville.net/2008/10/14/partial-reque...
Hi folks,
I'm trying to access a simple ASP.NET MVC route, but it's erroring with:
The parameters dictionary contains a
null entry for parameter
'isFoo' of non-nullable type
'System.Boolean' for method
'System.Web.Mvc.ActionResult
Transform(Boolean, System.String)' in
.. blah blah blah.
Ie. the boolean property is not ...
So far my options are ADO.Net data services, WCF REST Starter Kit(not sure if I can use it, as their EULA is hard to comprehend and confusing), ASP.NET MVC.
There are quite a few posts, but I want to see if there are anymore frameworks that I am missing. Also please post your experiences if you already used any of the above options.
Th...