asp.net-mvc

Disabling "Remember My Password" prompt to users visiting site.

So I have an ASP.Net MVC site and I was wondering if it was possible at all to make it so users will have to enter in their passwords manually so its not auto filled for them by the browser? It seems like a simple thing to ask, but googling this I just get instructions on how a client can disable their prompt. ...

jqGrid visibility issues

jqGrid and IE8 are not making friends... ( the jqgrid is invisible in the IE, sometime when the mouse is over it, it appears, but still after sec it disappears. in FF, Chrome, Opera it works fine. is there a good explanation for this?? ...

Need a GUI based deployment solution for .net

Ok.. I have looked through this site and just can't seem to find the answer I am looking for. We have a multi server setup for our web sites, typically (DEV/QA/PRODUCTION). Our sites are .net which require some sort of build before being deployed. We are using SVN for source control and are looking for a tool/website/something that will...

Redirect loop with SSL action filter in ASP.NET MVC

I am using an ActionFilter (see below) to detect whether or not 1. the current controller/action requires SSL and 2. SSL is currently being used, and redirect accordingly. This works fine locally (using a dummy cert in IIS 7) but once I get it up on the server I get an error indicating an infinite redirect loop. Any ideas? public cla...

Problem saving an uploaded image

Hi, This is my first question. Thanks to everyone who contributes to this site, it's been a huge help as I try to teach myself programming. I'm having a problem saving an uploaded image. I think I'm doing something wrong with the image.save function. My code is as follows: Controller: [AcceptVerbs(HttpVerbs.Post)] public Actio...

Disabling the button after once click

Hi All, In my application i need to disable the button once it is clicked so that user should not click more than once. APplication is MVC ASP.NET i have done this in normal asp.net application. I tried using javascript and Jquery its not working button is getting disabled but then form is not getting submitted <script language="jav...

.NET MVC : Calling RedirectToAction passing a model?

I got a view List.aspx that is bound to the class Kindergarten In the controller: public ActionResult List(int Id) { Kindergarten k = (from k1 in _kindergartensRepository.Kindergartens where k1.Id == Id select k1).First(); return View(k); } That works. But this doesn't [AcceptVerbs(HttpV...

How to interact with List<t> in MVC

I have the following code in my view <% foreach (var item in Model.stats) {%> <label style="style="float:left;"><%= item.Stat_Caption %></label> <%=Html.TextBox(item.Stat_Caption,item.Stat_Value) %> <%} %> I'm trying to turn my stats object which is just a list collection, into a list of textboxes so ...

Exception handling with RenderAction Asp.Net MVC

We are using renderaction provided by MVC futures. We've noticed that HttpExceptions in child action methods are not propagated to the parent action. Even though a fragment has failed, we still see the parent request resulting in a 200, and this throws our error handling for a toss. Any suggestions on how this could be handled? Thanks, ...

Problems with an NHibernate query

Dear All, I am currently involved in a parts catalogue project. To give you some background info, I have 3 nHib Entities Part, Application and Vehicle. Part.cs public class Part : Entity { public Part() { Quality = new PartQuality(); FitmentPosition = new FitmentPosition(); OEPartNumbers = new List<OEP...

When Is It Appropriate to Use Html.RenderAction()?

Hi Guys I'm a little bit unsure about when it's appropriate to use Html.RenderAction() to render my Views and when not to. My understanding is that because it's not an 'official' component of ASP.NET MVC it's bad practice to use it, and its original intention was for reusable widgets that don't exist in any specific Controller context. ...

Disable form authentication for public pages

Hi, In my development environment everything works as I expect. I can access all the pages and as soon as I get to a secured page I check the Request.IsAuthenticated and redirect to the login page if needed. The problems starts when I deploy the project under IIS7. When I access the site I'm being redirected to the login page (as defin...

Entity-Record Security

Its work fine but when user change 'ProductDTO.Property1' field name to 'ProductDTO.Property2' - via firebug, DTO's Property2 setting as client request. In the meantime, I'm not wondering about DTOs but when i map an entity to page for editing, client can change db records. I want to protect some properties with role. Users cannot chang...

Starting Asp.Net MVC with VS2010 and MVC 2

I am starting out with MVC on VS2010 RC, having done a lot with Web Forms previously, and have been working my way through various tutorials and guides for MVC 1. My question is, is it worth buying an MVC 1 based book for use with MVC 2, or are they significantly different that that would make it confusing? The reason I ask is because ...

Can we make overloaded controller method in ASP .NET MVC

I am developing a ASP .Net MVC project but i can't make overload of Index() even when i have defined other method with different no. of parameters & have given proper routing for it . But it doesnot seems to work. So i just want to ask can we make overloaded methods in controller or not? ...

Mapping between multiple tables in MVC

I have develop an application in MVC. I have 4 tables in MYSQL database. Topic(topicid,topic) with topicid as primary key subtopic(subtopicid,subtopic)with subtopicid as primary key question(questionid,question,answer) with question as primary key Detail(Id,topicid,subtopicid,questionid,title); with Id as primary key I have u...

How to send email address verification email in MVC?

In web forms I used MailDefinition class to send email templates. How can I do the same with MVC? [HttpPost] public ActionResult Register(RegisterModel model) { if (ModelState.IsValid) { // Attempt to register the user MembershipCreateStatus createStatus = MembershipService....

name 'html' nor name 'model' exist in current context in usercontrol MVC and C#

I am using Microsoft MVC and C#. I have a usercontrol (example.ascx) created and at the top I'm inheriting System.Web.MVC.ViewUserControl<PostTransferViewModel> Now, while my model name is appended to ViewUserControl, I get "The name 'Model' does not exist in the current context" and "The name 'Html' does not exist in the current contex...

Asp.MVC and nHibernate and Lucene question

Hi, I have an Asp.Net MVC app and I am looking into implementing a search engine that will search for individuals. I would like to use Nhibernate Search & Lucene.Net as this will keep the index in sync when an individual is inserted or updated, resulting in changes being visible when a user runs a search. The issue I have is what if m...

Should there be a Service Layer in Asp.net mvc?

Should there be a Service Layer in Asp.net MVC between Controller and Repository? As Repository is there for only Data Access. Some business logic is leaked into Controller. This might create a problem if the same operation is used by classic Asp.Net client as we have to duplicate the logic in Controller. ...