Hi I'm writing an ASP.Net MVC intranet application which is accessed via handhelds and a range of browsers. My users all have AD accounts and have different permission to our SQL database views/procs depending on who they area. The database also uses CURRENT_USER for horizontal partitioning.
Because of the range of devices that nee...
I have implemented my own inversion of control methodology in MVC 2. I was thinking of reviewing MVC Turbine and possibly switch to that. However, I noticed today that MVC 3 Preview 1 has been released and has new inversion of control support built in. I know it will be a while before it is released, but wanted to see if anyone knows ...
Hi,
I have the following question:
It is easy to insert an oBject in database with a form.
Just create an object
link it to the fields in your from.
Post back to controller,
create a new datacontext and do datacontext.InsertOnSubmit(object)
.
public static void AddPage(string lang, Page page)
{
...
Hi!
I'm trying build my application using REST and Spring MVC. For some entities I have special page for update. After data submit it validated. If there are no errors it's redirecting to view of this entity otherway to edit page. haw I must pass data (entity and validator result) between controllers?
here implementation with some ve...
In MVC-Model View Controller design you implement the model to work seperately and contain buisness logic, pulling information down from the database.
I struggle so much with the design of implementing a good model. I know what information needs to be pulled down from the database, I just don't know the best way to implement it. I think...
I am taking over a lot of the ColdFusion stuff that is lingering at our shop and they are insistent it stay on ColdFusion and that new projects in this area MUST be done in CF - basically this part is non-negotiable. I am not very experienced in CF (haven't touched it since 2003) so most of my development has been in .Net, MVC, C#, Linq...
I've seen it all over SO, blogs, and books, where the authors tell you add ViewModels specific to your View in your Model projects as wrappers for your underlying model objects. The idea is to make it very simple and targeted when you go to do model binding to the View. Here is a good example: Rendering and Binding Drop Down Lists using ...
I have a controller that handles three actions that are specific to my problem.
The first is the edit action which returns a view with an HTML form that the user can edit properties on the given item.
The second is the update action which accepts the post back form the browser and updates the database. When the update is successful w...
<% using(Html.BeginForm()) { %>
...
<% } %>
OR
<% Html.BeginForm(); %>
...
<% Html.EndForm(); %>
What are the advantages/disadvantages of using both ways to use Html.BeginForm?
...
tempdata variables works like a session variables?
basically i want to do is to when the form loads for the first time the variables should be empty. but the variable should be persisted until i am on that form.
the form contains searching with a submit button as well as the paging .
basically my ques is to use what approach should ...
$.getJSON(
dUrl,
data:'{ a: 2, b: 3 }',
function(data){alert(data);}
});
Will making a $.getJSON() request be able to pop up the pdf/docx in a new window? if yes, could you please share more info on this..
I'm getting the pdf/docx file from Response stream into Fiddler.
But need to find a way to push it to Save...
I currently joined a team that is working on an asp.net mvc 1.0 app.
The app is quite large so changing to mvc 2 right now is not an option.
I have visual studio 2010 Ultimate which doesnt come with mvc 1.
When I tried running opening the solution in my computer I got a conversion wizard. I tried following it but the app just doesnt c...
I've seen some teams that start breaking into multiple projects from the beginning and others build behemoth single projects. The large project teams say that one massive project is easier to maintain than multiple smaller projects.
In general, how many files is too many?
...
See below:
Edit.aspx View:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Test.Models.Friend>" %>
Edit
<h2>Edit</h2>
<% using (Html.BeginForm()) {%>
<%= Html.ValidationSummary(true) %>
<fieldset>
<legend>Fields</legend>
<div class="edit...
I am creating a survey application so I created a surveys controller that behaves very restfully creating, updating, etc a Survey. However now I'm adding other actions to it like 'take', for taking a survey, and 'share', for sharing a survey. There are more actions too. I'm starting to wonder if I should organize my code differently a...
Is it a good practise to decouple input checking from a model and have it handled elsewhere, say by a controller? If so, how could this be done from an MVC or DDD standpoint?
...
Hi,
I have loaded a prtial view in my MVC 2 application. The partial view is loaded via the jquery get method. The partial view contains the following code below. The problem I am having is that when the submit button is clicked the xval validation message appears but the form still gets posted. Has anyone any ideas how to stop the ...
I'm slowly getting into MVC, but it's still relatively new to me. From what I've discovered by doing a few tutorials, MVC provides an interface for communication between the database and the website and in general allows for better organization of the code.
Are there other significant advantages to using an MVC structure? What would be...
Hi,
normally i load a partial view by doing
<% Html.RenderPartial("MyPartialView", Model); %>
But how can i assign the Model to the corresponding action, when i instead use jQuery to load this partial view?
$.ajax({
url: "/MyUrl/",
data: 'html',
success: function (data) { $('#MyPartialView').html(...
For the last couple of Days I have been working on a small web application. I decided to use ASP.NET MVC. I made this decision mostly because I think it is the best way to really control the web front-end and render valid HTML pages. However, I know that MVC can be much more.
Even though my App is quite small, I am focusing on my app...