I’ve been working on a project with the Asp.Net MVC framework lately, and thought I’d write up some lessons learned. I’m using Professional ASP.NET MVC 1.0 as a guide. The first chapter is available online for free as a pdf. One: Be absolutely certain you are avoiding web forms web controls. I took the master [...]
Archives for Web
Integrating Internet Services on Your Site (Or Mini-Cloud Web Sites)
Something I’ve been increasingly fascinated with over the last year is the reuse of free internet services that I have. On my site, I have widgets that feed the last 4 posts from this wordpress blog, and my twitter feed. I also have an ajax live bing search box that will return results from my [...]
IEnumerable and Linq
I was helping someone on StackOverFlow.com and ran into an interesting issue. The post is here. I explained the issue in my response, but I’ll try to sum up. Newer collection types implement IEnumerable(Of T) as opposed to the original IEnumerable interface. For example, System.Generic.List(Of T) implements IEnumerable(Of T), so the following is valid without [...]
SilverLight and Z-Index
When implementing a new SilverLight custom control, it was blocking menu popups (html / javascript) on the page. I set the z-index of the div and object tags that contained SilverLight to no avail. After a lot of googling, I found the following solution. Set the Windowless property to true. In the case of manually [...]
JSON Objects
Answered a question on StackOverflow that I thought is worth posting about. It’s surprising how many people try to work with JSON without knowing javascript. Most JSON either returns objects {} or arrays []. The first thing you learn about JSON is that you can just eval the object. In the case of arrays, you [...]
How I Use ASP.Net Skins and Themes
Recently reading some discussion of themes, and skins were listed as bad, because they cut out the designer and required duplication for any non-server control element. As in the following: I want all my text input’s to have a blue background. So I said background=”blue” in an asp.net skin file, and create a blue style [...]
On Wikipedia Bashing
MSNBC’s Helen A.S. Popkin takes a crack at Wikipedia: http://www.msnbc.msn.com/id/28799154/ “So there you go, kids. Wikipedia is not a news source.” – Helen A.S. Popkin Helen, I have a follow-up question to your piece of sarcastic wisdom. Is Encyclopedia Britannica a news source? How about Funk & Wagnalls (Best Publisher Name Ever)? Wikipedia is an [...]
On the Rise, Fall, and Resurgance of Javascript
Douglas Crockford’s essay on Javascript’s history and resurgance is a great read, if you haven’t already read it. – “Given the process that created JavaScript and made it a de facto standard, we deserve something far worse.”
Help With Path Issues
First, here’s a good way to see what you have available in code… <form id=”form1″ runat=”server”> <div> <% For Each key As String In Request.ServerVariables.AllKeys%> <p><%= key %>: <%=Request.ServerVariables(key)%></p> <% Next %> </div> </form> But in general all you need to do is read the following: http://weblogs.asp.net/scottgu/archive/2006/12/19/tip-trick-how-to-run-a-root-site-with-the-local-web-server-using-vs-2005-sp1.aspx
App_Code and Namespaces
When working in Asp.net, I discovered something interesting about namespace. Before I explain what that is, a little background… If a page accesses it’s masterpage through the typical this.Master way, then any custom methods you’ve written aren’t accessible as it as typed as a MasterPage, not your class that inherits it (presumably something like _MyMasterPage). [...]
