You are browsing the archive for HTML.

by Editor

Building my new blog with Orchard – Part 3: one way to skin a cat

October 11, 2010 in Articles, ASP.NET, CSS, News, Reference

These last few weeks I’ve been refraining from starting any deep work on my new Orchard-powered blog because most of what I had in mind involved widgets, which are being built right now. Version 0.8 is just around the corner: the team is just putting the final touches to the new theme engine and to the widget system. In the meantime, there is still some work I could do that I knew would not be throw-away, and that is CSS. My objectives with this new blog is to reflect in design what the content is about and what it is not about. VuLu is about knowledge, science, art and philosophy. It’s not about shiny gadgets, technology or engineering. That of course means I want nothing web 2.0 in here. Good thing as I don’t have much love for rounded corners…(read more)

by Editor

Building my new blog with Orchard – part 2: importing old contents

September 9, 2010 in .NET, Articles, ASP.NET, News, Reference

In the previous post , I installed Orchard onto my hosted IIS7 instance and created the “about” page. This time, I’m going to show how I imported existing contents into Orchard. For my new blog, I didn’t want to start with a completely empty site and a lame “first post” entry. I did already have quite a few posts here and on Facebook that fit the spirit I wanted for the new blog so I decided to use that to seed it. The science and opinion posts on Tales of the Evil Empire always seemed a little out of place (which some of my readers told me quite plainly), and the Facebook posts were blocked behind Facebook’s silo walls even though they were public. You still need a Facebook account to read those posts and search engine can’t go there as far…(read more)

by Editor

Ban HTML comments from your pages and views

April 2, 2010 in .NET, Articles, ASP.NET, News, Reference

Too many people don’t realize that there are other options than <!– –> comments to annotate HTML. These comments are harmful because they are sent to the client and thus make your page heavier than it needs to be. When doing ASP.NET, a simple drop-in replacement is server comments, which are delimited by <%– –%> instead of <!– –>. Those server comments are visible in your source code, but will never be rendered to the client. Here’s a simple way to sanitize a web site. From Visual Studio, hit CTRL+H to bring the search and replace dialog. Choose “Replace in Files” from the second meny on top of the dialog. Open the find options, check “use” and make sure “Regular expressions” are selected. Use “*.aspx;*.ascx;” as the…(read more)

by Editor

Binding a select in a client template

March 12, 2010 in Articles, ASP.NET, News, Reference

I recently got a question on one of my client template posts asking me how to bind a select tag’s value to data in client templates . I was surprised not to find anything on the web addressing the problem, so I thought I’d write a short post about it. It really is very simple once you know where to look. You just need to bind the value property of the select tag, like this: < select sys : value ="{binding color}" > If you do it from markup like here, you just need to use the sys: prefix. It just works. Here’s the full source code for my sample page: <! DOCTYPE html > < html > < head > < title > Binding a select tag </ title > < script src = http://ajax.microsoft.com/ajax/beta/0911/Start.js type…(read more)

by Editor

“Badgifying” an ASP.NET page

January 29, 2010 in .NET, Articles, ASP.NET, News, Reference

I apologize for the neologism. What I’m going to demonstrate in this post is a technique I prototyped a few months ago to make it very easy to embed an ASP.NET page’s content in another page, even if it’s using another server technology. This of course works cross-domain. The reason why you would do that is to enable people to embed badges with your contents on their own sites. Examples of such badges can be found in the margin of this blog: there’s the ad badge, a Twitter badge, a Facebook badge, an Xbox Live badge, a Zune badge, and there used to be a Flickr badge. There are even full commenting systems that you can include on your blog this way. All those are Flash or JavaScript, and in both cases there’s a short JavaScript stub that includes…(read more)