Not sure if the title makes sense, but here's what I'm doing. I'm using AutoMapper to map my Entity Framework Entities to my DTO objects and vice versa. The issue comes when I try to map the DTO data to the EF entity. There's not a property to property mapping for the EntityKey. To fix this, I do some like the following:
Mapper....
I need to understand something about ASP.NET session state, as it applies to IIS 7 and ASP.net 3.5.
If an application is configured to use in-process session state, will that work OK if there are multiple worker processes? In other words, do worker processes share session state?
The default configuration for IIS 7 is to use in-process ...
With NInject (preferably 2.0), what options do we have wrt wiring up our object dependencies in a web application?
Can they be defined in an XML configuration file?
Or does it have to be done via code?
...
I am looking for a way to pass an parameter to the user control? Right now I have a big if statement and code duplication in my user control. I want to have the loop inside the view and I want to pass the current index of the loop to the user control?
// current view
Html.RenderPartial("DetailsRateForm", ViewData.Model);
// ASP.NET MVC...
I use the following code: (returns an excel obviously)
ControllerContext.HttpContext.Response.ContentType = "application/ms-excel";
ControllerContext.HttpContext.Response.Write(sw.ToString());
ControllerContext.HttpContext.Response.End();
return View();
where sw is a StringWriter in which i create my excel structure(a tabl...
I have enumerations that I need to display in a dropdownlist, and have them pre-populated in my admin pages.
Are there any built in html helpers for this already?
(asp.net mvc)
...
Are there any html helper methods for displaying boolean values in a dropdown?
...
For my administration area I have created a special route. I did this so my urls look cleaner, and it avoids the problem of me having 2 controllers with the same name.
Example: I have a UserController and another AdminUserController for the admin site of the application.
I don't want URL's like:
http://www.example.com/user/...
http:...
I have xml data that I am returning to my view. I am putting it in a textarea, but this displays it unformatted. How can I format the xml for display in my view?
I will be displaying the xml in only part of the page, so I can't let IE display it. I want it to be in standard xml indented format.
Thanks
...
I have read various articles about the modal state that is used in the ASP.NET MVC. I have read this article link text from Scott Gu. I have some code in my controllers that are hitting the database every time a select list is need to display an error. Is there any way to have the modal state save the lists contents? Or maybe cache the l...
Hi
I am wondering how we can set the width of the Dropdown.
When i write the below line of code, I am getting compilation error.
<%= Html.DropDownList("product", ViewData["product"], new { style = "width: 300px;"})%>
Appreciate your responses.
...
I am currently refactoring our messy controllers. We have a lot of SelectLists in our controllers. I want a way make it easier to maintain our code base. What would be a good solution a Factory Method, Interface or Base Class? We a lot of these methods floating around our code.
private SelectList getRateContract(IEnumerable items)
{...
when deploying to mvc 2 rc to a server, all we need to do is deploy the updated .dll's for mvc correct?
i.e. nothing has to be installed on the server?
BTW, After installing MVC RC, where are the new .dll's?
...
just installed asp.net mvc 2, where are the new .dll's?
...
I am looking to produce an MVC site which has complete control of the url structure using routing.
routes.MapRoute(
"BlogView", // Route name
"view/{blogurl}", // URL with parameters
new...
How would I go about doing the following:
I upload a video file via asp.net mvc application.
I then stream this video inside a silverlight usercontrol.
I'd like to know the libraries and software i'll need. The workflow, and if possible, some code samples / links to samples.
Thank you,
...
Simplest case, I'm creating a "Create View" for a task list, and I want to allow the user to select a "Category" from a related table via a dropdownlist.
Should I
Create a custom model that contains a Task and an IEnumerable?
Instanciate the CategoryController from the "Create Task View" and bind the DDL via a method on the CategoryC...
Hi
I have an Insert button on the View Page.
On this Insert Button click, there is controller Action Method (InsertUser) that inserts record.
After successful insert i want to diplay the user like a MsgBox that ("Record successfully inserted") using any plugins...etc.
Appreciate your response.
...
I have had good experiences recently developing with ASP.NET MVC and am considering whether or not to use it for a project coming up at work. One important consideration though: they sell source code licenses separately as a rule, and it's the kind of application we can't realistically tie to our own hosting without cutting off a large c...
In my master page I have a menu that uses jquery ui accordion.
What is the best way to specify which item should be active?? the only thing I can think of is
$(document).ready(function() {
$("#accordion").accordion({
collapsible: true,
autoHeight: false,
active:<%=ViewData["a...