|
Posted to:
|
Today we are sharing a pre-release build of a new code generation framework known as ASP.NET Scaffolding, as well as a scaffold generator (code generator) for Web Forms. The Web Forms scaffold generator can automatically build Create-Read-Update-Delete (CRUD) views based on a model. Introduction Many programming tasks involve writing standard “boilerplate” code. Templates can help avoid having to hand-write all of this code, but only to a degree because they are static. MVC3 introduced the concept of scaffolding - generating code dynamically based on existing artifacts in a project. We are now extending this concept to other frameworks, starting with Web Forms for CRUD views generation. The scaffolding framework provides APIs, conventions and...
|
|
Posted to:
|
Last year the ASP.NET start talking about something we've called "One ASP.NET." I showed some mockups of our ideas last summer at the aspConf Keynote that you can watch online . We also announced then that we would add new features to ASP.NET as out of band releases (OOB) without breaking existing functionality. This means that developers don't have to wait for the next version of Visual Studio for great web development features today. We're aiming to add to ASP.NET and Web Tools every 6 months. For those that don't want to wait, Mads and the team also started a feature playground called Web Essentials . This is an extension to Visual Studio that updates all the time with ideas and brainstorms about how VS can be an...
|
|
Posted to:
|
I’m excited to announce the final release of the ASP.NET and Web Tools 2012.2 update . This update is a free download for Visual Studio 2012 and .NET 4.5, and adds some great additional features to both ASP.NET and Visual Studio. Today’s update makes no changes to the existing ASP.NET runtime, and so it is fully compatible with your existing projects and development environment. Whether you use Web Forms, MVC, Web API, or any other ASP.NET technology, there is something in this update for you. Click here to download and install it today! This ASP.NET and Web Tools update will also be included with the upcoming Visual Studio 2012 Update 2 (aka VS2012.2). Visual Studio Web Tooling Enhancements With today’s release, all of the ASP.NET...
|
|
Posted to:
|
If you've ever implemented a file upload or download scenario in ASP.NET, you've likely come across the situation of having to provide a MIME type based off of a file extension. IIS does this automatically when it serves files, but it seems like in ASP.NET there isn't a good way to provide this functionality. Searches on the web might point you to building your own Dictionary of MIME types or just writing a switch statement, but this felt like a hack to me and so I turned to a resident expert, Levi Broderick. It turns out in ASP.NET 4.5 we shipped a little-known new type, System.Web.MimeMapping, which has an API called GetMimeMapping(string fileName). Here is the MSDN documentation . You can pass either a file name as the method...
|
|
Posted to:
|
Placement.info is an XML file that orchestrates the different parts of a content item and sends each of the shapes they create into specific local content zones. If the previous sentence sounded confusing to you, fear not, this post is for you. When writing an Orchard theme, more often than not, you know exactly what parts exist in your content type, and you know where you want them to render. Placement can be extremely powerful, but it’s rather abstract and it reverses the usual logic of placing contents on a page. What most people really want to do is write a template with simple markup and placeholders inside that markup for the rendering of specific parts such as title, summary, tags, etc. Placement forces you to dispatch those part shapes...
|
|
Posted to:
|
In the previous blog post , you can see how easy it is to enable OData query syntax for a particular action using Web API OData. Simply add a Queryable attribute to your action as follows, you are done. 1: [Queryable] 2: public IQueryable<WorkItem> Get( int projectId) It not only works for those actions using OData format, but also applies to any vanilla web api actions using other formats such as JSON.NET. It greatly reduces the need to write a lot of actions to perform operations like top, skip, orderby as well as filter. It is so powerful that it is almost hard to imagine building a real Web API application without it. Now everything works beautifully, why validation? As great as this may sound, adding Queryable to your action could...
|
|
Posted to:
|
If you want to create a simple widget in Orchard, such as a box of social links, you have three possibilities: Find a module on the gallery or write one yourself, but there is overhead associated with modules, which may make this overkill. Use an HTML widget and paste a bunch of HTML and Javascript, hoping administrators of the site don’t break it accidentally. I don’t like this, it feels like a hack. Create a simple widget, following the instructions in this post. First, let’s create a content type (in the admin, go to Content / Content Types and click “Create new type”) and call it “Social Links”. Add the widget and identity parts. Those are the only ones you really need: Uncheck creatable and draftable, add the “Widget” stereotype (with an...
|
|
Posted to:
|
TL;DR - To Long Didn't Read Version BrowserStack Integrated into Visual Studio From a debug session inside Visual Studio 2012 today , click the dropdown next to your Debug Button, the click on "More Emulators" to go to http://asp.net/browsers and get the BrowserStack Visual Studio extension and three months free service. There's other browsers to download as well, like the Electric Plum iPhone/iPad simulator . New Online Tools for Modern Sites Head over to http://modern.ie for a bunch of tools for making cross browser sites easier, including on online site analyzer and downloadable Virtual Machines for any Virtual Platform. I do a lot of cross-browser testing and I've been on a personal mission to make "Browse With...
|
|
Posted to:
|
Earlier this month, the 10 startups in our Fall 2012 Accelerator class got the chance to pitch to a room full of investors, mentors and technology enthusiasts. Over three hundred people joined us on the Redmond campus to see the final pitches in person. Aseem Badshah, CEO of Socedo , using social to deliver sales leads. For venture capitalists and angel investors, Demo Day was the chance to meet, and possibly fund, ten new startups that are looking to change the world. For the companies that were a part of this inaugural Accelerator class, this was their official coming out party—an opportunity to capture the attention of investors, reach customers, celebrate how far they’ve come in three short months - and the great businesses they...
|
|
Posted to:
|
With the upcoming ASP.NET 2012.2 release, we’ll be adding support for OData to WebAPI. In this blog post, I’ll go over the three simple steps you’ll need to go through to get your first OData service up and running: Creating your EDM model Configuring an OData route Implementing an OData controller Before we dive in, the code snippets in this post won’t work if you’re using the RC build. You can upgrade to using our latest nightly build by taking a look at this helpful blog post . 1) Creating your EDM model First, we’ll create an EDM model to represent the data model we want to expose to the world. The ODataConventionModelBuilder class makes this this easy by using a set of conventions to reflect on your type and come up with a reasonable model...
|