I'm building an ASP.NET MVC 2 site where I'm currently implementing an OpenID sign-up form. Unfortunately, I'm foreseeing a possible security bug/vulnerability inside my architecture.
Here's how I want OpenID login to work:
User requests /Account/Login, Controller sends back OpenIDLogin View.
User enters their OpenID into the View, th...
In my web application I do a lot of updates. And therefore the only acceptable UpdateCheck mode for all columns except for the primary key one is "NEVER".
But unfortunately the DBML designer automatically sets the "ALWAYS" mode. So I have to go through dozens of columns to change it manually, and when I have to update the DBML file... ...
I am playing around with MVC 2 a bit and was trying to hook up a text box to the Microsoft AjaxToolkit AutoCompleteBehavior.
and I cannot get the java script to fire. Originally I thought that my scrpt references were wrong but have pointed the scripts to the CDN versions.
it looks like I never enter the Sys.Application.add_init(functi...
I'm building ASP.Net MVC2 application on top of a legacy database. Every table in the database includes an id that defines to what organization it belongs to. Like:
| id | name | org_id |
| 1 | John | 4 |
| 2 | Joe | 4 |
| 3 | Anne | 2 |
Now, user "John" should not see Anne from another organization e.g. get that ro...
I'm trying to pass a javascript associative array to a controller.
I can pass normal arrays into a controller with this:
public JsonResult ProductsByFacets(List<string> facets)
but this won't work with associative arrays
...
Hi,
I have switched from asp.net mvc 1.0 to 2.0
My actionlinks:
<%=Html.ActionLink("Add bla", "addbla", new { id = Model.Id })%>
now produce urls like this:
addbla/500
rather than:
addbla/?Id=5008
does this have to do with the routing:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("{*favicon}...
I am using ASP.NET MVC 2 & C#.
I want to include/embed an html page (raw text & styling; no forms) in one of my views as is without my own css styling (read: The site.css styles for the ASP.NET MVC 2 application itself) affecting it. I can access the page statically and open it in a new window and it retains it's styling; however, if I ...
I have just started looking into .net MVC and I really like it.
There are a few developers within our team who think the same. But before we are alowed to use it for any project we need to get the approval of management.
What would be the best way to convince management(which know little about programming) that this would worth while an...
I've two radio buttons,
<%= Html.RadioButtonFor(m =>m.Type,true,new {id = "rdPageType",CHECKED = "checked" }) %>
<%= Html.RadioButtonFor(m =>m.Type,true,new {id = "rdPageType12",CHECKED = "checked" }) %>
How can I check which is selected, when the 1st is selected, I should be able to set the boolean value of 'rdPageType' to true, and ...
Hi,
This is my application's current workflow for user registration.
register form ( GET /register )
submit the form ( POST /register )
after success, redirect route to "/registerSuccess"
in (GET /registerSuccess ) view, I want to show the message like "username has been registered successfully".
Controller Actions:
public Action...
Folks:
My ASP.NET MVC 1.0 application is more like a workflow.
Means: Parent controller's action method (authentication) --> Child 1 Action method --> Child 2 Action method --> Child n Action
Now once the visitor completes the Authentication through the parent controller's action method he can manupulate the URL and jump directly to t...
Hi, I must admit that I'm new to ASP.Net MVC and I'm currently researching all the best practices on how to start my new project. So far I have understood the concepts of the Repository Pattern and Unit of Work and I have gone onto Dependency Injection and Inversion of Control (IoC). I have been looking into this for the last 2 days an...
Hey!
I have a scenario where the user have the option to click the button "download" and I should create a csv file, that contains history data, and then let the user save the file locally. As I haven't done this before, I started to look around for how to do this and basically came across both Custom View Engine, and Custom Action Resu...
Hi all,
I've used stackoverflow many a time to solve my problems (code related!) but this is the first time I've needed to post a question cause I cannot work out whats wrong.
When I enable client side validation on a view that allows editing of a collection of objects which use DataAnnotations for validation the following exception is...
Hi there,
Can anyone tell help me understand the new CRUD scaffolding that is included with MVC 2?
Let me explain, for example below you have 2 Create Actions...
Now i presume that if i have the form "Post to itself" then the second with Attribute POST is executed - IS THIS CORRECT? so a form within a view that when Submitted submits...
Hi, I need help. I can't access my portable area from my main project. I build everything and I get a 404 error when trying to access this portable area (localhost:123/IW/Home), but all my regular areas are working fine (ex: localhost:123/Portal/Home)
Here's what I did in order to install my portable area
-I downloaded MVCContrib
-I add...
I've set up DI with Ninject in my ASP.NET MVC application like this
Bind<IRepository>().To<XmlDefaultRepository>().WhenInjectedInto(typeof(PageController)).WithConstructorArgument("contentType", ContentType.Page);
Bind<IRepository>().To<XmlDefaultRepository>().WhenInjectedInto(typeof(WidgetController)).WithConstr...
This works:
public ActionResult Save(int id, string name)
{
var profile = _profileRepository.GetById(id);
profile.Name = name;
_profileRepository.Save(profile); //this calls SaveOrUpdate()
//session.Commit() gets called in global.asax on Application_EndRequest()
//profile.Name is changed in the database
}
Since my...
I am finalizing a MVC project and have switched to using Google's CDN for jQuery. After doing that, do you delete out the unused .JS files from the scripts folder?
...
i have a page with a jqgrid on it with filter row at the top. I want to have a link on another page that loads this grid page but with a filter set on one of the columns. is that possible to do from a link or any other workaround people can suggest?
...