hello, I am working on the chart project in asp.net mvc. i used followinf code to genrate the chart on the controller.
Chart chart1 = new Chart();
chart1.Height = 296;
chart1.Width = 412;
chart1.ImageType = ChartImageType.Png;
Title title = chart1.Titles.Add("Main");
Series series1 = chart1.Series.Add("ser...
I have Entity Framework entities Events which have an EntityCollection of RSVP. I want to convert the EntityCollection of RSVP to a generic List<> of a POCO class RSVP.
So I want EntityCollection -> List.
What would be the best way to go about achieving this?
So far I have this (it's missing the RSVP part)
var events = from e in _en...
I'm going to deploy an ASP.NET MVC project on IIS (6.0 & 7.5) but don't now is it necessary to install anything on IIS?
...
I've been away from building browser applications for a long time. I'm now interested in creating one for a hobby of mine. I dread having to deal with HTML, JavaScript etc. to build a high quality browser based user interface. I've got the full suite of Telerik controls. Is it possible to build a polished, somewhat feature rich browser U...
Hi all,
I was wondering if anyone knew of any way i can implement an application which will do the following.
Allow a user to specifiy a connection string to a sql db
Allow a user to specify a table in the db
Allow a user to specify columns from the specified table
Generate Views, a Controller with Crud methods, & Data access code on ...
Hi folks,
I have the following route's defined:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = "" }
);
// Added custom route...
I have asp.net MVC application which uses asp.net membership. I configured the user details from local system using Asp.Net web site administration tool. Now I have deployed the site in server and I need to change the password. Now I have the ASPNETDB.MDF file in the App_Data folder.
How to edit the details?
...
i have such code
var prj = _dataContext.Project.FirstOrDefault(p => p.isPopular == true);
if (prj != null)
{
prj.isPopular = false;
_dataContext.SaveChanges();
}
prj = Details(id);
prj.isPopular = true;
_dataContext.SaveChanges();
idea-i have only one re...
I'd like to parse an incoming URL into it's component parts for some pre-processing before passing it into the standard MVC routing logic. For example given your standard route
{controller}/{action}/{id}
and the URL
/user/show/10
Is there a way to have the Routing system return a dictionary containing controller, action and id keys...
I'm investigating ASP.NET MVC now and noticed that in ASP.NET MVC application, which is created by Visual Studio by default, links "Home" and "About" are staying active when the user is on "Home" and "About" page correspondingly, and after clicking on the current page link page is reloading itself.
What is the correct approach to disabl...
I've got a web page where the user can add a new item to a category and that item is saved to the database. However, the ID of the item is an identity value for the database table, so I don't know what the ID will be, and I need this ID so that the user can edit the item later.
I'm using ajax to make a POST submit:
$.ajax({
url: 'T...
my object has field with data type int. when i put in html form in this textbox letter not number the validator say- The field must be a number. how can i change this messages like this
[Required(ErrorMessage = "Введите название")]
[DisplayName("Название")]
public int age { get; set; }
...
I have a controller that implements a simple Add operation on an entity and redirects to the Details page:
[HttpPost]
public ActionResult Add(Thing thing)
{
// ... do validation, db stuff ...
return this.RedirectToAction<c => c.Details(thing.Id));
}
This works great (using the RedirectToAction from the MvcContrib assembly).
...
Is there any freeware library (controls) for ASP MVC implementing posting and displaying comments?
...
I don't want to make this into a "which is better... MVC or WebForms" type of question. Im sure that has been asked a bunch of times here already.
My Question: If I am building a MVC web project, why should I not use an ASP.NET datagrid control on one of my "Views" .aspx pages?
...
I was just editing some C# code between <% %> tags in an .ascx file, and I noticed that the Refactor contextual menu is unavailable. And even if I manually add items from this menu to a custom toolbar, they are disabled when viewing aspx/ascx files.
I usually only have small snippets of C# code in my aspx/ascx files, but it would still ...
My web app solution consists of 3 projects:
Web App (ASP.NET MVC)
Business Logic Layer (Class Library)
Database Layer (Entity Framework)
I want to use Ninject to manage the lifetime of the DataContext generated by the Entity Framework in the Database Layer.
The Business Logic layer consists of classes which reference repositories (...
I'm trying to write an auto-scaffolder for Index views. I'd like to be able to pass in a collection of models or view-models (e.g., IEnumerable<MyViewModel>) and get back an HTML table that uses the DisplayName attribute for the headings (th elements) and Html.Display(propertyName) for the cells (td elements). Each row should correspond ...
Hi,
if I put a custom class in session, then in an action method I get an instance of that class from session, and populate some fields, I noticed that when a different controller gets that class from session, those fields are populated. Even though after the first call didn't save the updated class back in session.
is this typical b...
Can anybody please help me with this as I have no idea why
public IHttpHandler GetHttpHandler(RequestContext requestContext)
is not executing. In my Global.asax.cs I have
public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}....