background preloader

MVC

Facebook Twitter

Event Calendar for ASP.NET MVC with dhtmlxScheduler « DHTMLX Blog. NOTE: We’re now offering DHTMLX Scheduler .NET, an optimized version for ASP.NET apps.

Event Calendar for ASP.NET MVC with dhtmlxScheduler « DHTMLX Blog

This tutorial will lead you through the steps required to integrate dhtmlxScheduler into an ASP.NET MVC application. dhtmlxScheduler is a JavaScript event calendar component, which can be used for a wide variety of use-cases connected to scheduling tasks. We will learn how to put this Ajax-based event calendar on a web page, load events from .NET sever side and update them in the database when a user makes changes in the browser. Download the final demo to get a better understanding of the solution we’re about to build. dhtmlxScheduler - Basic Week View Modern web apps impose ever higher demands on the user interface. Preparation First of all, you need to create a new project. While the DB tool is open, you can add some test data to the “Events” table.

The next thing you need is the dhtmlxScheduler package, which can be downloaded from the dhtmlxScheduler homepage. NerdDinner Step 9: Authentication and Authorization. [This is step 9 of a free "NerdDinner" application tutorial that walks-through how to build a small, but complete, web application using ASP.NET MVC] Right now our NerdDinner application grants anyone visiting the site the ability to create and edit the details of any dinner.

NerdDinner Step 9: Authentication and Authorization

Let's change this so that users need to register and login to the site to create new dinners, and add a restriction so that only the user who is hosting a dinner can edit it later. NerdDinner Step 3: Building the Model. [This is step 3 of a free "NerdDinner" application tutorial that walks-through how to build a small, but complete, web application using ASP.NET MVC] In a model-view-controller framework the term "model" refers to the objects that represent the data of the application, as well as the corresponding domain logic that integrates validation and business rules with it.

The model is in many ways the "heart" of an MVC-based application, and as we'll see later fundamentally drives the behavior of it. The ASP.NET MVC framework supports using any data access technology, and developers can choose from a variety of rich .NET data options to implement their models including: LINQ to Entities, LINQ to SQL, NHibernate, LLBLGen Pro, SubSonic, WilsonORM, or just raw ADO.NET DataReaders or DataSets. How to: Filter at the DataContext Level. Insert, Update and Delete using Entity Framework in Asp.MVC. How Return to previous page. Chapter 6 - Understanding HTML Helpers. This is a rough draft of a chapter from the book ASP.NET MVC Framework Unleashed by Stephen Walther.

Chapter 6 - Understanding HTML Helpers

Comments are welcome and appreciated. When the book is published, the text from this blog entry will be removed and only the code listings will remain. Building an MVC 3 App with Database First and Entity Framework 4.1. ToString Method (String) Public string ToString( string format ) Parameters format Type: System.String A standard or custom date and time format string (see Remarks).

ToString Method (String)

Return Value. GetHtml Method. Public IHtmlString GetHtml( string tableStyle, string headerStyle, string footerStyle, string rowStyle, string alternatingRowStyle, string selectedRowStyle, string caption, bool displayHeader, bool fillEmptyRows, string emptyRowCellValue, IEnumerable<WebGridColumn> columns, IEnumerable<string> exclusions, WebGridPagerModes mode, string firstText, string previousText, string nextText, string lastText, int numericLinksCount, Object htmlAttributes ) Parameters tableStyle.

GetHtml Method

How to Dynamically Load Image in ASP.NET-MVC3 with jQuery. Intro to ASP.NET MVC 3 (C#) Note: An updated version of this tutorial is available here that uses ASP.NET MVC 5 and Visual Studio 2013.

Intro to ASP.NET MVC 3 (C#)

It's more secure, much simpler to follow and demonstrates more features. This tutorial will teach you the basics of building an ASP.NET MVC Web application using Microsoft Visual Web Developer 2010 Express Service Pack 1, which is a free version of Microsoft Visual Studio. Before you start, make sure you've installed the prerequisites listed below. You can install all of them by clicking the following link: Web Platform Installer. Alternatively, you can individually install the prerequisites using the following links: If you're using Visual Studio 2010 instead of Visual Web Developer 2010, install the prerequisites by clicking the following link: Visual Studio 2010 prerequisites. Only show first sentence of content. ViewBag dynamic in ASP.NET MVC 3 - Hajan Selmani.

Earlier today Scott Guthrie announced the ASP.NET MVC 3 - Release Candidate 2.

ViewBag dynamic in ASP.NET MVC 3 - Hajan Selmani

I installed the new version right after the announcement since I was eager to see the new features. Among other cool features included in this release candidate, there is a new ViewBag dynamic which can be used to pass data from Controllers to Views same as you use ViewData[] dictionary. What is great and nice about ViewBag (despite the name) is that its a dynamic type which means you can dynamically get/set values and add any number of additional fields without need of strongly-typed classes. In order to see the difference, please take a look at the following examples. ASP.NET MVC Delete ActionLink with confirm. Asp.net mvc 3 - What is the @Html.DisplayFor syntax for. C# - EditorFor() and html properties. Asp.net mvc 3 - MVC 3 C# - Database.open - 'The name 'database does not exist in the current context' Html attributes for EditorFor() in ASP.NET MVC. ASP.NET # MVC # 17 – Html.ActionLink and Html.RouteLink Helper Methods « Microsoft Mentalist.

Hi Geeks, Today we will see and Helper methods. This produces the following markup, assuming the default routes: < a href =”/Home/AnotherAction”> LinkText </ a > You can specify a Controller name as the third argument to link to an action of another Controller.For example, to link to the action, use: {*style:<i><b>Note </b>:Notice that you specify the Controller name without the Controller suffix. In many cases, you have more route parameters than you need to supply in order to choose the correct URL to render for the action link. <% : Html.ActionLink( "LinkText" , "About" , "Account" , null , new {title= "withdraw from account" }) %> The ActionLink methods have specific knowledge about ASP.NET MVC Controllers and actions. Hence, these methods provide convenient overloads that allow the specifying of a controllerName and actionName directly.

The RouteLink methods follow the same pattern as the ActionLink methods but also accept a. MVC 3: Layouts and Sections with Razor. This is another in a series of posts I’m doing that cover some of the new ASP.NET MVC 3 features: In today’s post I’m going to go into more details about how Layout pages work with Razor.

MVC 3: Layouts and Sections with Razor

In particular, I’m going to cover how you can have multiple, non-contiguous, replaceable “sections” within a layout file – and enable views based on layouts to optionally “fill in” these different sections at runtime. The Razor syntax for doing this is clean and concise. I’ll also show how you can dynamically check at runtime whether a particular layout section has been defined, and how you can provide alternate content (or even an alternate layout) in the event that a section isn’t specified within a view template. This provides a powerful and easy way to customize the UI of your site and make it clean and DRY from an implementation perspective. What are Layouts? You typically want to maintain a consistent look and feel across all of the pages within your web-site/application. Site Layout Scenario Summary.