I've been working with web for over 7 yrs and I've upgraded from html->ASP->ASP.Net and now the new flavors of ASP.Net itself. I was to begin with MVC last year but due to deadline and the complexity involved in MVC I couldn't. Now, once again there's a new upgrade - I've begun with the ASP.Net DD (Dynamic Data) Templates (the latest one...
Possible Duplicate:
Biggest advantage to using ASP.Net MVC vs web forms
I'm soon gonna develop a reporting solution. Would be glad if some one let me know , which is the best way to go. Web forms or MVC?
...
I'm trying to write a strongly typed helper
which would be something like this:
Html.Lookup(x => x.FooId);
for now I have this:
public static MvcHtmlString Lookup<T,TReturn>(this HtmlHelper<T> html, Func<T, TReturn> expression)
{
// get string "FooId" here
}
anybody knows how to get this ?
...
I have fixed my file upload file size as 50MB using the following code
< httpRuntime executionTimeout="60" maxRequestLength="51200"/> in Web.cofig file.
When i am uploading more than 25MB file it displays error message as "file or directory not found". How to fix this issue?
...
Hello,
I have a partial view where I render, if the user has choosen an option, a button that permit the user to generate automatically a value for a certain field. Please give a look at this picture to understand what I mean:
This is achieved using the following markup on the partial view
<%= Html.LabelFor( model => model.IssueCode...
I have a SilverLight button that gets a comment from a text box to be saved in my database and then closes the window.
SilverLight:
Task task = new Task();
private void saveChangeBtn_Click(object sender, RoutedEventArgs e)
{
string commentTxtBxValue = commentTxtBx.Text;
task.SaveComment(commentTxtBx.Text);
commentTxtBx.Text...
Hello,
I try to compile with VS 2008 old C# Service project based on WSE where DIME attachments are used:
The compiler does not find:
using Microsoft.Web.Services.Dime
I just installed WSE 3.0. Even that does not help to find Microsoft.Web.
What is the replacement for DimeAttachment class?
thanks Arman
EDIT
Well the answer w...
I have an HTML Helper that essentially renders static content read from HTML files (inside of a vdir). There are cases when the HTML file has a title element defined and in such cases, the current page should use the given title. The content inside of the body should be rendered where the Helper class is referenced in the View.
This is ...
Hi there,
Will keep this as simple a possible:-
I have a have a controller which will return either ViewA or ViewB - e.g.
[HttpPost]
public ActionResult ViewA(BlahModel model)
{
if (isTrue)
return View(model);
else
return View("ViewB", model);
}
...
The problem I have is that ViewB has a form on it. And what hap...
the very famous actionlink:
<%: Html.ActionLink("Back to List", "Index")%>
Now, this link is in my Details view. The Index view is a search page. The url of that looks like this:
http://localhost:50152/2011-2012/Instelling/Details/76?gemeente=Dendermonde&postcode=92**&gebruikerscode=VVKSO114421&dossiernr=114421%20&o...
Hello - I'm porting an existing system to ASP.NET MVC2. In the current legacy app, the user can select from dozens of available fields to customize CRUD forms for different entities in the domain model, similar to the way ERP systems allow customization of core modules.
My question: I'm looking for a good pattern or example for this ki...
In my model I have relationships like this:
[Person]
PersonId (PK)
...
[Orders]
OrderId (PK)
PersonId (FK to Person.PersonId)
...
A person can have multiple orders.
I generated PersonController with Create/Details/List/Edit views. I want to be able to manipulate Orders also, but within the context of a Person. In other words, I...
Hi I have a MVC site and will have users inputting text to be displayed on a web page.
I am trying to come up with a graceful way of handling any HTML that the user try's to input - as you will probably be aware MVC 2 throws an error for any HTML in the text.
I use ViewModels and decorate my properties with filters from the DataAnotatio...
Hi all,
I'm trying to approximate Single Sign on. Currently, the most workable solution involves the user imputing details on my site before being sent off to goggle Apps to authenicate.
I'm using dotnetopenauth to send and recieve the requests
This means that it takes no account of google apps login cookies should they be present.
...
I have a SelectList that gets populated with data from the database. The data comes from a Dictionary<int, string> and populates the SelectList like below.
//...
Courses = new SelectList(GetCourses(),"Key","Value");
//...
On the View, it shows the first record from the database as the default selected value on the dropdown. I'd like...
I have a custom validator for my class Exceedance. I added the IsNumeric field as follows,
[NotEmpty(Message="Field cannot be empty"),IsNumeric(Message="Only numbers allowed")]
public virtual int Min { get; set; }
[NotEmpty(Message="Field cannot be empty"),IsNumeric(Message = "Only numbers allowed")]
public virtual int ...
I'm experimenting with different combinations of strongly typed view models, full views and partial views, using both RenderPartial() and RenderAction(). The form-post scenario I'm asking about, though, is one that comes from the "main" view--one that isn't a partial. This main view's controller constructs the view model that provides ...
I've seen plenty of examples (NerdDinner, Sanderson's Sports Store, etc.) where a view is bound to a collection of objects. The syntax in the view is usually something like this...
<%@ Page... Inherits="System.Web.Mvc.ViewPage<IEnumerable<MyViewModel>>" %>
...
<% foreach (var myViewModel in Model) { %>
I've also seen plenty of exampl...
Hello,
I am getting a bit confused about how an N Layered MVC application should look. I am thinking as standard there should be:
ASP .NET MVC Project
Service Layer
Data Access Layer (containing repositories)
I am confused as to where the entity framework model should sit (.edmx). Should it be in the Data Access Layer? Should any par...
Hello SO,
I am trying to implement the TinyMCE Spellcheck plugin that uses GoogleSpell. The thing is I am trying to install it in an MVC environment.
I started by referencing the .NET class Library DLL (MoxieCode.TinyMCE) in my project.
Then, I added this code to my web.config:
<system.webServer>
<handlers>
<add name="TinyM...