Safely Encoding Strings On ASP.NET MVC Razor Pages (sometimes)

  Background Sometimes, we want to let html tags come through our web pages from user defined content.  If for example, you have a workflow that requires approval before publishing, there are times when you want to let the author put through html, links, etc.  Solution In Visual Studio write a simple HtmlHelper method that allows for a flag you can pass through.  In my case, I have a database table with a boolean column “allowhtml”.  If this is set, then instead of using Html.Raw(…) I can use my own helper method, pass in the allowHtml value and if it is set true, then allow the not encoded Html to flow through. Here is that helper method: namespace WebAPI.Code.Helpers { public static class … Continue Reading

Awesome Announcement Regarding Code Stars Summit (2 weeks from now)

As most readers of my blog know, I organizer both Silicon Valley Code Camp (going on our 9th year now with dates set for 10/11-12/2014 again at Foothill College in Los Altos) and Code Stars Summit which is happening for the first time this year in San Francisco.   Code Stars Summit is a much smaller event (under 100 people) is a paid event with top quality workshop leaders doing all day training events.   Yesterday, we added the benefit that all attendees will get a 1 year subscription to Frontend Masters.  See the announcement below for details. Breaking News: All attendees of Code Stars Summit will receive a free 1 year subscription to FrontEnd Masters catalog of online courses ($390 value).  FrontEnd Masters has courses in … Continue Reading

Why In Sencha’s ExtJS or Sencha Touch Source is so Important

image.png

Right now, I’m trying to figure out how to turn grouping on and off in a Sencha ExtJS store. That is, I have a page that looks like the following where I want to have a checkbox to turn the grouping page on and off depending on how the user wants to see the display. So, I look in the help and I don’t find a method in the “store” documentation that says enableGrouping or disableGrouping.  I do find one that says “isGrouped” however.  So, clicking on the view source for that I now see source as follows: which tells me that if there are no “groupers” defined that my store is not grouped. Just sayin… … Continue Reading

ExtJS Not Using autoLoad Best Practice

The typical usage pattern in Sencha’s ExtJS for loading data into a visual control such as a grid is to assign a grid to a store, then let the store have autoLoad: true which means that when the store is created, it will automatically be loaded and since it is assigned to a visual control (grid), the grid will be populated.  I don’t like that pattern.  I like to be more in control.  There may be things I want to do before the grid is loaded. So, what I do is in the application launch event I load my store first and in my store itself, I explicitly tell it not to autoLoad by setting autoLoad to false.  Below is an example of the code I’m using at the moment to handle this.  Notice that I cleverly show a load mask … Continue Reading

Follow

Get every new post delivered to your Inbox

Join other followers: