62 items found in the ASP.NET Web Pages Category
Mikesdotnetting - 16 May 2013 14:00
CKEditor is one of the most popular rich text editors available. Out of the box, there is no file browser to help with selecting images, but you can purchase an add-on from them - CKFinder. Alternatively, you can build your own file browser component.
Mikesdotnetting - 25 February 2013 19:43
Whether you are using the Razor WebGrid in an ASP.NET Web Pages site, or an MVC application, you may well want to display tabular data at some point in which case you are likely to turn to the Razor WebGrid helper. And if you want to do that, you might also want to add a footer to the rendered table. Here are some ways that you can accomplish that task.
Mikesdotnetting - 15 February 2013 19:31
The ASP.NET Web Pages Bakery template site is designed as a starting point for a site that displays products. It also features an order form for customers to specify a quantity for a specific product and provide their shipping address. The site doesn't provide for multiple product selection. If you want a shopping cart for the Bakery site, you need to create it yourself. This article looks at the design considerations behind an effective shopping cart, and shows how to build one.
Mikesdotnetting - 05 February 2013 19:55
Increasing numbers of businesses are making services and data available to third parties via Web Services or feeds. Data format and protocols can vary significantly across service providers, so here is a look at how to manage the consumption of a number of popular formats delivered through REST and SOAP services within a web site built using the ASP.NET Web Pages framework.
Mikesdotnetting - 22 January 2013 14:44
Recursive methods are those that call themselves, and they can be applied to solve a number of common practical problems, particularly ones that involve the management and display of hierarchical data. This article explores some of those scenarios and shows how to design recursive helpers and functions that can be used in Web Pages sites.
Mikesdotnetting - 07 January 2013 20:38
This article looks at how you can provide your users with the ability to export the contents of a Razor Web Pages WebGrid to an Excel file using OleDb.
Mikesdotnetting - 27 December 2012 20:17
SignalR is a library that simplifies the creation and management of persistent connections between web servers and clients. This facilitates the development of applications that can display updates to data held on the server in real-time. Chat applications are the most obvious beneficiaries of this technology, but line-of-business applications that need to report availability to users can benefit too. Here, I look at extending the canonical SignalR chat example to incorporate a "who's typing" feature, and I also extend my previous Knockout example to use SignalR.
Mikesdotnetting - 20 December 2012 13:31
This article looks at how you can provide your users with the ability to export the contents of a Razor Web Pages WebGrid to a PDF file using the popular free PDF library, iTextSharp.
Mikesdotnetting - 17 December 2012 20:17
This article looks at how you can provide your users with the ability to export the contents of a Razor Web Pages WebGrid to an Excel file.
Mikesdotnetting - 14 December 2012 19:24
The Web Pages WebGrid offers sorting capability out of the box. However, it's not always obvious to the user on which column the grid data is being sorted at any one time, nor the direction in which it is being sorted. The convention is to provide arrows in the column header to act as a clear visual cue. This article looks at a three ways in which you can enhance your grids with sorting arrows.
Mikesdotnetting - 13 November 2012 10:37
Unlike the Web Forms GridView control, the Web Pages WebGrid doesn't offer anything by way of inline editing capability. This article looks at one approach to solving that requirement through the addition of a sprinkling of jQuery.
Mikesdotnetting - 23 October 2012 21:27
Every so often, you will want to conditionally render HTML attributes or their values within your Razor Web Pages based on the outcome of some runtime logic. Often, the logic required to manage this can become messy and lead to unnecessary spaghetti code. This article explores a few common scenarios and provides some solutions, as well as introducing a nice new feature that was released as part of Razor v 2.0.
Mikesdotnetting - 27 September 2012 13:39
Some people have questioned the security of the ASP.NET SimpleMembershipProvider's storage of passwords. The cause for concern seems to stem from the fact that the PasswordSalt field in the standard membership table is unused by the SimpleMembershipProvider, whereas it is used by, for example, SqlMembershipProvider. So what is the PasswordSalt field, and why should the fact that it isn't used raise an eyebrow?
Mikesdotnetting - 20 September 2012 14:56
It's an odd thing: WebMatrix 2 is lauded for its support of HTML5, but the Web Pages framework doesn't include any helpers for the new HTML5 form input types such as email or color. It's fair to say that support among browsers for the new inputs is patchy at the moment, but with barely a week flying past without a new version of one or other browser being released, it won't take long for that to change. So in the meantime, if you prefer to use helpers, you have to write your own for rendering HTML5 forms.
Mikesdotnetting - 18 September 2012 08:08
Since the introduction of the Web Pages framework, ASP.NET has been making use of the dynamic type introduced in C# 4.0. Along with that comes some new error messages which at first glance don't make a lot of sense - mainly because they are unexpected. I have already looked at how dynamics do not support extension methods, and a recent question in the ASP.NET forums illustrated another way in which the dynamic type can catch you out.