asp.net-mvc

SSRS ReportViewer 2010 Iframe IE Problem

Hello all, My problem relates to trying to include an SSRS (SQL Server) Report inside my MVC application. I've settled on the hybrid solution of having a WebForm with the ReportViewer Control in and then on my MVC View pages having an iframe reference this WebForm page. The tricky part is that the iframe needs to be dynamically popula...

Using EditorFor in ASP.NET MVC 2.0 to render a span

Hi, I have a complex object that if I render in this way: <%=Html.EditorFor(x => x.ContactRoleDto.Competencies[0].Name) %> The above generates the following element which has the name and id tags that I want: <input Size="40" id="ContactRoleDto_Name" maxlength="100" name="ContactRoleDto.Name" type="text" value="" /> I would like t...

Which datagrid to use for ASP.NET MVC2 project?

Hi, I am developing a commercial MVC2 app that requires a grid that has callback update in some form to support 10,000+ rows. It should also support relatively rich content (icons, multiline descriptions etc). Although it requires the usual paging/scrolling/sorting features it does not need support for grouping. So nothing that special. ...

What is strongly-typed View in ASP.NET MVC

What is strongly-typed View in ASP.NET MVC? ...

How to disable button on form submittion when form is valid

I am using client side validation. How can I disable submit button, then form is valid? <script src="/content/js/jquery.validate.min.js" type="text/javascript"></script> <script src="/Content/js/MicrosoftAjax.js" type="text/javascript"></script> <script src="/Content/js/MicrosoftMvcValidation.js" type="text/javascript"></script> <fi...

how to convert textbox type to password in asp.net mvc

how to convert textbox type to password in asp.net mvc ...

Forms authentication, ASP.NET MVC and WCF RESTful service

One test webserver, with the following applications service.ganymedes.com:8008 - WCF RESTful service, basically the FormsAuth sample from WCF Starter Kit Preview 2 mvc.ganymedes.com:8008 - ASP.NET MVC 2.0 application web.config for service.ganymedes.com: <authentication mode="Forms"> <forms loginUrl="~/login.aspx" timeout="2880" ...

Deploying ASP.NET MVC to IIS6: pages are just blank

I have an MVC app that is actually on a couple other servers but I didn't do the deploy. For this deploy I have added the wildcard to aspnet_isapi.dll which has gotten rid of the 404 error. But the pages are not pulling up, rather everything is just blank. I can't seem to find any IIS configuration differences. The Global asax.cs fil...

Asp.Net MVC ActionLink

Can anyone explain why the following happens? And how to resolve, Visual Studio 2010 and MVC2 <%= Html.ActionLink("Add New Option", "AddOption", "Product", new { @class = "lighbox" }, null)%> Results in /Product/AddOption?class=lightbox <%= Html.ActionLink("Add New Option", "AddOption", "Product", new { @class = "lighbox" })%> ...

Hyphenated html attributes with asp.net mvc

Is there a nicer syntax when creating elements with hyphenated attributes instead of using: <%= Html.TextBox ("name", value, new Dictionary<string, object> { {"data-foo", "bar"} }) %> Looking at the HTML specs for the proposed standards HTML 5 and WIA ARIA it seems hyphens in HTML attributes are being planned to be more common as so...

How to get these values front end using asp.net mvc

hello friends, <div> <label> Date: <span><input type="text" id="date" /></span> <%--<%=Html.EditorFor(model=>model.Date) %>--%> // Should I use this as Input type? </label> <label> Number#: <%=Html.TextBox("Number", ViewData["inq"] ?? "")%> </label> ...

Asp.Net MVC 2.0 client side validation VS 2010

There seems to be some confusion, at least for myself, on client side validation using the data annotations framework and <% Html.EnableClientValidation(); %> Most of the examples I have seen like on haacked.com use the following scripts jquery.validate.js MicrosoftMvcJqueryValidation.js However, visual studio 2010 asp.net mvc 2 ...

Built in method to encode ampersands in urls returned from Url.Action?

I am using Url.Action to generate a URL with two query parameters on a site that has a doctype of XHTML strict. Url.Action("ActionName", "ControllerName", new { paramA="1" paramB="2" }) generates: /ControllerName/ActionName/?paramA=1&paramB=2 but I need it to generate the url with the ampersand escaped: /ControllerName/ActionName/...

Convert an ASP.NET MVC application into a 3 tiered architecture.

Hey guys! I'm using ASP.NET MVC to develop an application for a library with Nhibernate. I've already used Repository and I'll add the Injection dependency. I'd like to know what are the different steps and what should I add to convert my app into a 3-tiered architecture? Thanks a lot for your help :). ...

Need Users to Re-authenticate with NTLM

I'm NTLM (authenication="windows" in the web.config) with an asp.net mvc 2.0 site. Right now once a user logs in it keeps them logged in for weeks at a time. The use of the application is being opened up to users who share computers that use logged in service accounts. I need the site to reprompt each user for their AD credentials...

how to dynamically change masterpage in asp.net mvc application

how to dynamically change masterpage in asp.net mvc application. Like in ASP.Net it can be changed in Page_PreInit Event ...

MVC Forms Authentication with custom database

I'm trying to get forms authentication working for an mvc site. I have a custom database with a users table, and I would like to do my own password validation. I am logging in my user like this: if (PasswordHasher.Hash(password) == dataUser.Password) { FormsAuthentication.SetAuthCookie(email, true); return true; } The problem i...

Nerd Dinner - labels for textfields are broken

Hello. I am trying to learn ASP.NET (since I know C#) so I have decided to follow Nerd Dinner Tutorial. I am having trouble in part 5 of tutorial. I exactly followed tutorial, even pasted whole code to my visual studio, but when I was supposed to create EDIT VIEW, my result was different than one in tutorial. Please take a look at follo...

ASP MVC ViewData from one view to another (Html.Encode())

Hello all, I have a page with a bunch of labels and checkboxes on it. On this page, the labels need to be easily customizable after the project is deployed. So I made all of the labels in this style: Html.Encode(ViewData["lblText"]) And I added a button on the page called "Edit Button Labels" that will only be seen by admins. When t...

How to use NInject (or other DI / IoC container) with the model binder in ASP.NET MVC 2 ?

Let's say I have an User entity and I would want to set it's CreationTime property in the constructor to DateTime.Now. But being a unit test adopter I don't want to access DateTime.Now directly but use an ITimeProvider : public class User { public User(ITimeProvider timeProvider) { // ... this.CreationTime = timeProv...