Mike Borozdin's Blog

A blog about programming, web and IT in general

Search

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© 2012 Mike Borozdin

Creating a Simple Ad Rotation User Control with LINQ to XML

Download files

Although there is a built-in control for advertisement rotation in ASP.NET, it is capable of showing image ads only. However, in the real life you often have to deal with the ads that require some JavaScript code, for instance, you want to put there AdSense code or want to use Flash banners instead of images. Thus, if you want to rotate complex ads, you have to develop your own control.

In this particular tutorial I'll show you how to create a very simple, but rather functional user control that will randomly show an ad from an XML file More...


Tags: ,
Posted on Saturday, August 30, 2008
Comments (2)

ASP.NET Myths Busted

busted Having read a great variety of forum and blog posts, I met a lot of misconceptions about ASP.NET that definitely made people to turn away from ASP.NET. I won't argue whether ASP.NET is better than PHP (or Ruby on Rails) or not, instead I'll try to bust those myths. More...


Tags:
Posted on Wednesday, August 27, 2008
Comments (7)

High Quality Image Resizing with .NET

I want to proceed with telling how to deal with uploaded images with ASP.NET. I have already showed how to resize images. However, that resizing method isn't perfect. It doesn't produce images of high quality. Even though it just shrinks images, the quality of resized images don't match the quality of original images, the produced quality usually appears to be worse. Sure, there is a neat solution. We just need to use the HighQualityB icubic Interpolation mode. Sounds difficult? In fact, it's not difficult to implement, just need to add a few lines of code,  but the result is great. More...


Tags:
Posted on Monday, August 25, 2008
Comments (10)

ASP.NET Image Uploading (part II)

In the previous tutorial I showed how to handle image uploads, how to validate some things and finally how to resize images retaining their proportions. This time I'll show you how to prevent uploading of files which size exceeds the defined limit. Well, this is not difficult to implement,  however there are some pitfalls I'll tell you about later. More...


Tags:
Posted on Sunday, August 24, 2008
Comments (0)

Correction to the Article on ASP.NET Image Uploading

I apologize, there were few mistakes in the article on ASP.NET Image Uploading. There was a logic error in the resizing method. Furthermore, I decided to use the <asp:FileUpload /> control instead of the HTML input, FileUpload automatically adds a proper encryption type to the form.

The article is still available by its previous URL, but now it's correct, as well as the project files.


Tags:
Posted on Saturday, August 23, 2008
Comments (0)

PowerCommands Cause Visual Studio 2008 SP1 Crash

I was badly surprised today, when Visual Studio 2008 SP1 suddenly quit while loading the "Choose Toolbox Items" dialog. After some Googling I learnt that such things were caused by PowerCommands, thanks to the guys here. However, the workaround is pretty simply, you just have to re-install PowerCommands. After that procedure Visual Studio starts working properly again.


Posted on Friday, August 22, 2008
Comments (0)

ASP.NET Image Uploading (part I)

Download files

Introduction

Is image uploading different from simply file uploading? No, but when creating an image uploading functionality you usually have to perform more operation, than if you application were to receive text files only. Basically, when making an image uploading form, you have to implement the following things:

  • Check if a file is uploaded
  • Check if the uploaded file is an image
  • Check if the uploaded file doesn't exceed a certain size
  • Resize the uploaded images without changing the proportions of the picture
  • Save the image

In this particular tutorial, I'll tell you how to perform the 3 operations, while I'll explain how to check the file size in the next part. More...


Tags:
Posted on Thursday, August 21, 2008
Comments (2)

Static Page Methods Instead of Web Services in ASP.NET AJAX Control Toolkit

As you may already know, it is required to create a web service to make use of some ASP.NET AJAX Control Toolkit controls. However, you can use static methods of your pages instead, you just have to mark them with the [System.Web.Services.WebMethod] attribute and not set the ServicePath parameter in the ACT controls. More...


Tags: ,
Posted on Sunday, August 17, 2008
Comments (0)

.aspx extension instead of .php? WHY???

This story is not a debate on "ASP.NET vs PHP", but this story is about the people who develop their web applications with PHP, but pretend that they are using ASP.NET. Yes, such people do really exist. I came across their posts in the forums, where they said that or asked how to change the extension of PHP scripts to .aspx.

Why on Earth are they doing that? More...


Tags: ,
Posted on Friday, August 15, 2008
Comments (15)

Creating Linked Drop-Down Lists with the CascadingDropDown Control

Download the project files

Creating dependant drop-down lists is a very common task, for example, when making a registration form, you usually have to add a country and a state fields, the contents of the state drop-down depends on the selected item in the country drop down field. Actually, it's not so difficult to implement that with the standard controls of ASP.NET. However if you don't want the page to be reloaded every time a user selects a value in the drop-down list, you should make use of AJAX. While you can use UpdatePanel for this task, it will be difficult if you have 3 or even linked drop-downs. Hopefully, you don't have to add a lot of UpdatePanels, instead you can pick up the CascadingDropDown Control from ASP.NET AJAX Control Toolkit. More...


Tags: ,
Posted on Wednesday, August 13, 2008
Comments (0)