In my partial class which defines a function which returns the type of IMultipleResults to bring back multiple result shapes from a stored procedure using the classes defined in my *.dbml file, for some reason the [ResultType(typeof(MyType))] isn't working. The MyType is saying that it cannot be found. The function is in the .cs file o...
I create a dropdown list by using ASP.NET MVC helper like this,
<%=Html.DropDownList("Group","-please select a group-")%>
and I get the html like this,
<label for="GroupId">Group:</label>
<select id="GroupId" name="GroupId"><option value="">-please select a group-</option>
<option value="15">Business</option>
<option value="16">Frie...
I have a class reflecting my dbml file which extends DataContext, but for some strange reason it's telling me
System.Data.Linq.DataContext' does not contain a constructor that takes '0' arguments"
I've followed various tutorials on this and haven't encountered this problem, and VS doesn't seem to able to fix it.
Here's my implemen...
I have Dropdown and on click of a button, I want to display data in the usercontrol
the below code is not working as expected.
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%
using (Html.BeginForm())
{%>
<%=Html.DropDownList("CarMake", (SelectList)ViewData["CarMake"])%>
<input...
I have an ASP.NET MVC app which is completely behind Forms Authentication. However there is one set of routes (/report/%) I need to force integrated windows authentication on, as those pages need to impersonate the current user (for security reasons).
If I set the whole site to integrated windows authentication this all works, except t...
A user will be able to upload an image. If the image is greater than a set size I want to downsize it to that size. Obviously it doesn't have to match exactly due to ratios, the width would be the key size so the height would be variable.
If the image is smaller than the set size I would like to create a new image to the set size with ...
I have a controller action that aggregates data from multiple sources: web service, database, file lookups, etc... and passes results to the view. So in order to render the page all tasks must have completed. Currently they are performed sequentially but as they are independent I am thinking of running them in parallel as this could impr...
Hi,
I have very simple control:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ConfiguratorMVC.Models.SpecyficationController.ViewSpecyficationViewModel>" %>
<link type="text/css" rel="Stylesheet" href="/Content/shCore.css" />
<link type="text/css" rel="Stylesheet" href="/Content/shThemeDefault.css" />
<h2><%= Mod...
What are all the methods that return an ActionResult in ASP.NET MVC as of right now (ie. RedirectToAction, etc.)
I haven't found a good documentation resource that lists this kind of stuff.
...
I'm trying to use the GRID control in the MVCContrib library with my controller. The paging control for their Grid seems to have a big limitation, it only outputs a URL as MyPage.aspx?page=2. So when I press NEXT PAGE on the control is spits out "MyPage.aspx?page=2"
My control looks like this:
public ActionResult Index(int? page)...
I use Linq to SQL as data access layer in ASP.NET MVC application. So the query result is a strong typed object. How can I dynamiclly specify which field to show in the page.
For example, the query result has the following fields:
FirstName
LastName
Address
Tel
My question is if one user wanna show the Lastname and the Firstname. 2nd u...
I installed MVC 1.0. Where's the System.Web.MVC dll so that I can use reflector to see how the helper methods are coded? I've looked in the bin folder of my ASP.NET MVC web app but it's not there. I am not quite sure where the MVC 1.0 installer installs the dll and how that wires up to the web.config of your MVC apps. Is System.Web.MV...
I have 2 tables in my database:
Category
BlogEntry
Each BlogEntry has 1 or more Categorys associated with it.
If I want to get a BlogEntry by its ID, I also want to get its Category information.
Maybe this example doesn't illustrate exactly a scenario where this would make sense, but say I want to load the Category ID and Name only...
Hello, im trying to upload multiple files using castle mono rail with framework 2.0
I did my controller for that but just for 1 file. When i try to re write for multiple files using the Request.Files i have problems.
Asp .Net mvc can work with that but castle don't :( I'm trying to use something like HttpFileCollection hfc = Request.Fi...
I am trying to deploy my MVC app on a subdomain, unfortunately I get 404 errors.
I tried to find out if it's MVC itself that can't handle being hosted on a subdomain.
I uploaded the standard bare MVC webapp that you get when you start a new project. The index page loads, but all the other pages that require actual routing based on the ...
Is there a good way to get my IoC to resolve dependencies on views? I have my own IoC resolver based on Castle Windsor. I have a IResourceService that I would like to have access in my views to resolve some strings.
...
I have an existing ASP.NET web application that I'm converting to MVC 1.0. The site started out with one goal. However, over time our sponsors are asking for more functionality and it is obvious that MVC would be our best route due to the new requirements. I've dabbled in MVC over the last couple of months and have a pretty good grasp on...
I'm adding the star rating plugin from www.fyneworks.com/jquery/star-rating/ and I'm finding the documentation rather obscure. It may just be that I'm looking in the wrong places, which wouldn't be that unusual for me.
We are on an asp.net MVC application, and I would like to add the star rating object in 3 different pages. On the "...
The following code:
<body onload="GetMap()">
<script type="text/javascript" src="https://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6&s=1"></script>
<script type="text/javascript">
var map = null;
function GetMap() {
map = new VEMap('myMap');
map.LoadMap();
}...
I'm working on an ASP.NET MVC project using jQuery.
I'm referencing the jQuery VSDoc file (jquery-1.3.2-vsdoc.js) in order to get Intellisense for jQuery in Visual Studio:
<% /* %><script src="~/Scripts/jquery-1.3.2-vsdoc.js"></script><% */ %>
Then Resharpers live solution analysis (the red/green symbol in the lower right status bar)...