You might wanna check this DotNetNuke Url Rewrite Module. It’s really really great (so far), and it’s free =)
Update : I ended up replacing my skin with Garland Wordpress theme. LOL
Finally I got myself a new theme, 3 columns just like what I wanted. Thanks to wpthemesplugin. I like Saur very much, and I’m gonna use it.
I also got my other blog over at Blogger a new look, check it out =)
First of all, I just want to sayMerry *belated* Christmas 2007 and Happy New Year 2008 =)
I had this blog for few months now, and I haven’t been able to put a lot into it lately. But I see that most traffic to my blog views my post about jQuery and ASP.NET. At that time, that was the only way I could came up with, but many people commented on my post, and I got a lot of feedback. Here are some other ways you might want to take a look at:
Also, I came across this website, called ExtJS, it’s kinda alternative to jQuery, but it could work side-by-side or even complementary to jQuery if you wish. I haven’t got a chance to look into it too much, but what I like about it is the beautiful UI and its theme-based skinning. You definitely should check it out!!
I found it really weird. Just as soon as DNN 4.8 is released, it seems like the DNN site itself has been having some trouble. Earlier this morning I opened the site, and I got a page showing the DNN site in its default skins (DNN Blue Skins) and all of the ‘custom’ menu, such as Forums, Projects, Blogs, etc, are broken. Later on, in the afternoon, I opened the site again, and it seemed it up and runnng again.
After I browsed around, I continued my work, which happens to be DNN Module Development at the time. In the noon, I ran into some problem, and I expect to find some answer in the forum. Guess what….??!! The DNN Site is acting weird again, for the 2nd time in the last 12 hours. All of the links are broken; they all redirect me to the main page. When I tried to access the forum page, I got the main page instead, and so on for every page.
What the heck is going on here??!! Could it be that DNN Team is trying to upgrade their site to DNN 4.8.0 and got this problem? Hopefully they fix this ASAP. I really couldn’t wait to try DNN 4.8.0, especially with Human Friendly URL feature that they got since 4.7 release =)
For all of you geeks out there, I’m pretty sure most of you have heard or watch this excellent movie called NUMB3RS. For those that isn’t part of it, here’s some quick overview.
Charles Eppes, young and brilliant mathematician, uses math to help his brother, Don Eppes, who works and leads an FBI unit. Even though the math couldn’t produce exact answer for all problems, but mostly it comes with acceptable degree of errors. So basically, Charlie (and his team) is the brain, and his brother (and of course his teams) is the muscle.
I was always amazed of how thorough and understandable all the math theory in the movie is. Turns out, Wolfram is the math consultant for this movie. And the great thing is that they created a dedicated website to explain about everything in the movie.
I came across this article, and it’s really helpful.
What I found is that, basically, to send HTML emails, you’ll need to setup AlternativeView, that is, to specify alternative view for your message.
Next, is to attach and show the embedded image. To attach an image or any file, just use LinkedResource object, and add it to the AlternativeView object you created earlier. The important thing is to set ContentId property, that is, to uniquely identify each resource you attached. The way to link it is pretty straight forward. For example, you attached an image and you set the ContentId to “MyPicture“. The way to show it is using normal HTML code in the AlternateView like:
<img src="cid:MyPicture" mce_src="cid:MyPicture" />
The rest are just normal logic in sending the email itself.
UPDATE: This method indeed worked; it can redirect the extensionless request to ASP.NET ISAPI. However, there’s still a problem with it. If the request includes parameters, for some reason, it changes the url to include ‘default.aspx’ thus breaking the code. For example: http://mysite.com/dostuff/?param=somevalue will be redirected to http://mysite.com/dostuff/default.aspx?param=somevalue. Anyone got any solution to this?
It is getting more and more common to see websites without “file extensions”, such as .php, .aspx, or others. This is possible with the aid of url rewriting technique. I tried UrlRewriter.NET, and I kinda liked it for it’s simplicity and flexibility.
It all worked just fine in my development machine, but when I uploaded the code to my hosting (shared hosting), everything just broke. Turns out it has some limitations (Note: This limitation occurs only for url’s without extensions, or url with extensions that is not configured in IIS). The reason for that, is IIS needs to know which HTTP request to be forwarded to ASP.NET ISAPI handler (at least until 5.1. I heard that IIS7 could overcome this problem via config, instead of modifying IIS settings). Only extensions configured in IIS will be redirected to ASP.NET ISAPI handler.
For those requests lucky enough to be passed to ASP.NET ISAPI handler, it will follow the HTTP Request Pipeline, and if it’s configured, it will go through UrlRewriter module first. For requests that are not passed to ASP.NET ISAPI handler, IIS will try to redirect it to the physical resource location on the server. For example: http://mysite.com/register/ will be redirected to folder register and try to load the default page (depends on the configuration, whether it’s default.aspx or others).
Lucky enough, I found a way to overcome this problem without having to forcing our way into the IIS configuration (even though this method might be quite irritating). The keyword is that “IIS will try to find the physical resource location on the server”. So, as Gil Grissom (CSI) once said, “If Mohammed won’t go to the mountain, then the mountain must go to Mohammed”, LOL. Anyway, so if IIS insists on finding the physical resource, let’s give him one. So, if you have one url rewriting configuration like /register, all you have to do is to create a folder called register, and don’t forget to at least create one file named to the default page filename (i.e. default.aspx, etc). And voilla, it worked.
PS: Don’t forget to do this step for every url rewriting configuration you have.
Turns out Pythagorean theorem isn’t only useful for triangle calculation only. This article explains it in details.
read more | digg story
In ideal cases, creating image thumbnail would be just resizing the image into the correct size, preferably according to certain ratio. However, in my cases, I need to resize images into a specific size (100×100 pixels for instance).
I came across this post. The code actually does what I want, but not quite. First, it ‘draws’ the image in upper-left corner. Secondly, the background (of the resized image) is black. I did some changes to the code to draw the image in the center, and set the background to white.
double ratio;
Image originalImage = Image.FromFile("...");
if (originalImage.Width > originalImage.Height)
{
ratio = (double)100 / (double)originalImage.Width;
}
else
{
ratio = (double)100 / (double)originalImage.Height;
}
Bitmap thumbnail = new Bitmap(100, 100, originalImage.PixelFormat);
using (Graphics g = Graphics.FromImage(thumbnail))
{
g.Clear(Color.White);
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBilinear;
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed;
g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighSpeed;
g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighSpeed;
g.DrawImage(originalImage, (int)((100 - (originalImage.Width * ratio)) / 2), (int)((100 - (originalImage.Height * ratio)) / 2), (int)(originalImage.Width * ratio), (int)(originalImage.Height * ratio));
}
I only added one line of code, that is, Clear() to set the background color of the image, and modified the last line. Instead of drawing the image at (0,0), it draws in the center (That is, thumbnail_size - scaled_image_size divided by 2).