Posted by mdrisser on 2010/01/19 under ASP.NET, Development, PHP |
Introduction: I am a PHP developer who has recently begun learning ASP.NET. Its an interesting journey to say the least. I’ve decided to share with you ways I’ve found to do things in ASP.NET that are second nature to me in PHP. They may not always be the most effective, or the most correct, but I am still learning. If you know of a better way to do something I post, by all means let me know in the comments.
In PHP we often check to see if a query string has been set through the use of the $POST or $GET variables and checking to see if they are set:
if(isset($_POST["q"]) {
// Do some stuff
}
But how to do this in ASP.NET? Well, the answer is quite simple. To check to see if there is a query string, simply do this:
if(Request.QueryString.HasKeys()) {
// Do some stuff
}
As I mentioned above, I’m still learning ASP.NET. Besides I subscribe to the TIMTOWTDI principal: There Is More Than One Way To Do It. If you have another and/or better way, leave me a comment.
Posted by mdrisser on 2010/01/07 under Design |
You’ve heard of the “Rule of Thirds”, “The Divine Ratio”, “The Golden Rule”, come on, I know you have. Its that magic division that designers and photographers use all of the time, a ration that is so prevalent in nature that the Pythagoreans said it came from heaven.
Read more of this article »
Posted by mdrisser on 2009/12/09 under JavaScript, Uncategorized, jQuery |
I was adding some jQuery to a sight I’m working on, code that would append the little “External Link” icon to a link, when I discovered a small problem. The code would, quite naturally, append the icon to links that were images themselves. After a few minutes of digging around and trying different filters, this is what I came up with:
$(‘a’).not(‘:has(img)’)
:has looks for a matching selector, in this case img, if it finds img in a link it then returns true to .not() which in turn says skip this link.
Some of you probably already knew that, but for those that didn’t I thought I’d pass it along.
Posted by mdrisser on 2009/11/30 under Design, Web Browsers, css |
I just read an article over at 456 Berea St. stating that “Vendor-specific extensions are invalid CSS“. Unfortunately comments are turned off for the article, so I can’t post this there.
Read more of this article »
Posted by mdrisser on 2009/11/02 under Design |
I recently was tasked with moving an ASP.NET site to a Joomla template, on the surface this seemed like a fairly easy task, but as I began delving into the original source files I realized that it wasn’t going to be as simple as I first supposed. I found it would be far easier to just start over from scratch, trouble was I didn’t have access to the original graphic. So here’s the solution I came up with.
Aside from your graphics app you’ll also need Firefox with the Firebug extension to use this method. (Note: This may work with other browsers and their respective developer tools, but I haven’t tried it yet. If you have and it works, please let us know in the comments.)
In order to get the graphic so that I could slice it up for the Joomla template, I thought I could just take screenshots and stitch them together, the trouble is that due to the complexity of the image, and the gradients used I couldn’t easily remove the text from the screenshots, I needed a way to get the screenshots without the text. Setting a negative text indent is a great way to hide text, for animations, etc., and should be a part of a web-designer’s repitiore.
So using Firefox and Firebug I set negative text indents, text-indent: -999999px. This worked great on MOST of the text but there was still some that just didn’t want to cooperate. Now what? Well it turns out that Firefox supports setting text color to transparent using color: transparent. I used this on the stubborn text and it disappeared. Now it was a simple matter of screenshots and stiching them together. In less than 5 minutes I had the graphic I needed to create the new Joomla template.