Monday, March 14, 2011

Microsoft Expression Locks Up When Saving Page

If Microsoft Expression locks up, freezes, or crashes when you are trying to save an .aspx .master or other type of page, you are not alone.

Fix:
In Expression, Click --> Tools --> Application Options --> Configure Editors.
For each file extension, click New Editor --> Open as XML. Move the XML editor to the top so it says (default).

Hope this helps

Monday, January 17, 2011

Outputting Tableless HTML Navigation with ASP>NET

If you are reading this, you are probably desperately trying to find a way to implement site navigation in an unordered list. You've probably also wasted several hours on the internet learning the basics of the DataList and DataTable controls built into ASP.NET; only to learn those two controls are contrived in such a way as to only output html in a table based format.

The solution is to use an asp:repeater. Here is a really well written article describing what I agree is the best method for outputting site navigation in an ordered list format.
  1. Output your data to an xml sitemap
  2. Display the sitemap on the page as an unordered list using a Repeater .



Sunday, August 22, 2010

New Stylesheet for PORDL

So, I spent the whole day Sunday making a new Generic XSL stylesheet for PORDL. I built javascript into the XSL that ticks through the nodes showing only one at a time. I was pleasantly surprised that they worked great out of the box for Picasa and FlickR gallery feeds.



PORDL makes it easy to embed the gallery with just one line of code:



<script type='text/javascript' src='http://pordl.com/js.aspx?id=289' ></script>

Friday, August 13, 2010

What's the Deal Windows?

For many, many years now, I have been seeing this stupid window, "Please wait while Windows checks for a solution", every time programs crash on my machines. This stupid popup window thing has never, ever worked. It is a total waste of time. I pretty much hit "Cancel", now, whenever I see it. Come on, Microsoft, are you every going to get this thing working?

Wednesday, July 21, 2010

Pass Querystring Parameter to ASP.NET Control

Although this is grade school stuff, when you can't get something working, you need to consult Google for the answer. But, I couldn't find the answer on Google. So, I will be the first, I guess:



I was doing some cross-browser scripting, trying to get the output of a ASP.NET contol to appear on a PHP page on another site. But, your reasons will probably be different. In any manner, if you need to pass variables through the querystring to an ASP.NET page, this info may help:




<asp:myControlName myPropertyName="'<%# Request.QueryString("myURLvariableName")%>' ></asp:mycontrolname>

Wednesday, May 26, 2010

XSL Transform of a Remote XML feed via Javascript - Requires VB.NET

I wanted to use Javascript to display an RSS feed from a remote web server via a client side XSL transform. Javascript has security levels to prevent 'cross browser' scripting attacks, so it won't let you pull in a remote feed. But, I wanted to do it anyway. Call me crazy.



My solution was to get VB.NET to pull in the feed and echo it from my web server, basically acting as a Proxy, and fooling Javascript into thinking the feed is safe.



I created a .ASPX page to pull in the feed, turn it to a string, and output the feed for Javascript to use.




Stupid Firefox wouldn't load an XML transform from a .ASPX page like IE will, so I had I couldn't stream the file dynamically. Instead, I had to write the script to save the stream to a .XML file.



This script needs to write to an .XML file on your server ( called blogger.xml in this example ). You'll need to assign write permission to that file.




<%@Page Language="VB" %>

<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Xml" %>







Third, I created an .xsl stylesheet for the feed and saved it to my server as a .xsl file. The stylesheet I created is for a Blogger Atom Feed:



xmlns='http://www.w3.org/2005/Atom'
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:georss='http://www.georss.org/georss'
xmlns:thr='http://purl.org/syndication/thread/1.0'
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">












( comments)









Then I used Javascript to do a XSL transform of the feed: NOTE: I spent a good deal of grief on this until I discovered my script wouldn't work for me in a .js file. I put it in the HEAD of my page and it worked fine.






<head onload="outputFeeds()">

Monday, May 17, 2010

GoDaddy Ruined my Sunday

So, basically, all I wanted to accomplish on Sunday was to connect my Visual Web Developer to a remote SQL Server database hosted by GoDaddy.

This should have been a piece of cake. I should have been able to set up the connection, do a little testing, and be done before breakfast, right? Well, it didn't work out that way. In fact, at 10:30 pm, I was still cussing up a storm. Turns out, GoDaddy doesn't allow remote connections by default.

If you are one of the lucky ones, the GoDaddy Database Manager will ask you if you would like to allow remote connections during the initial setup of the database. Wait an hour for GoDaddy to create the database, and you should be up and running.

I, however, was not one of the lucky ones. GoDaddy's Database Manager never, ever prompted me to allow remote connections. I tried to fight it. I tried to connect with other services, Visual Studio, Expression Web, etc. No avail. I finally decide to try GoDaddy support. Their email tells me I need to delete all my databases from the Database Manager so they can migrate my service to a server that allows remote connections.

I would normally not be angry, not a bit, in fact. I wouldn't care how many hoops I had to jump through so long as I could get this thing working. Problem is, there isn't a single piece of documentation on the web to let me know GoDaddy was blocking remote connections and I would need them to move me to another server. Thanks for ruining my Sunday, GoDaddy!