ASP.NET Cafe
new tricks every week

ASP.NET Cafe special - Sakura UI Discount!

Tuesday, 29 January 2008 06:47 by dmitriy

Do you know what makes your web form  looks ugly? DropDown boxes. You can make everything look great but can affect design of HTML <SELECT> element. It's a pity, but this is true. Also, do you know about the problems with z-Index in IE 6 and SELECT element? Huge problems. But everything can be better - with SakuraUI DropDown.

Special offer for ASP.NET Cafe visitors. You can order Sakura DropDown Control for ASP.NET only for $149 $99 (per developer, royalty free distribution).

Just use the following coupon code: ASPNETCAFE-02-08 in ordering process.

This offer last till the end of February.

Visit sakuraui.com to download control for free, try live demo and use discount.

  ;;;;;;

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   ASP.NET
Actions: E-mail | del.icio.us | Kick it! | DZone it! | Permalink | Comments (0) | Comment RSSRSS comment feed

Webmasters - don't lose your visitors

Monday, 21 January 2008 03:46 by dmitriy

All over the web we can find many tips how to get more visitors to your website. But there are one thing that can make things better.

Many sites lose their visitors because of one little html attribute. This is "target" attribute of your hyperlinks. Yes, it's very-very important. I saw this on many sites, some outer link (that points to other domain, or banner) opens in the same window, that's all. What is probability of "Back" button hit? Specially if user interesting in that resource too? That's why AdSence make me sad, we are losing visitors for cents. And visitors annoyed too. For example, I'm reading some blog, and I see interesting banner. I'm clicking and reading 5-6 pages there, and want to get back...

The same for any external links on you site. You want to "Kick it" or something like this in the same window?

So, when you are thinking about serious things like linkbuilding and seo, think about your links first, maybe you just doing something wrong?

Better to use <a target="_blank" ... to open everything in new window. 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Main | Main
Actions: E-mail | del.icio.us | Kick it! | DZone it! | Permalink | Comments (0) | Comment RSSRSS comment feed

Looking for ASP.NET Hosting ?

Friday, 18 January 2008 11:29 by dmitriy

Sometime ago, ASP.NET hosting was quite expensive. And most of peoples used php or something else for their web projects. Even I did. But time is changing everything, and now asp.net is a budget technology. We have free .net framework, web developer and hosting for affordable prices. At least we can write and run our sites using this good technology. We have .NET Blog Engine and Yaf, Pdf Sharp, SharpZipLib and other good things (my respect to the developers of these projects).

No, I'm not saying that PHP or Ruby is a piece of shit, these technologies are very cool too.

So, one year ago I started to looking for asp.net web hosting... The most of hostings over the web is something reselled from another resselers... I was impressed, how easy to start own hosting company. But because of this you can receive one big problem - overload. And another big problem - very slow support. Many times I was asked - why do you need support? You know, 99% you don't need it. And first time I've found one cheap hosting, it was a real piece of shit. Don't look for low price in case of hosting, if it's possible - take dedicated server, if not - use good shared servers. Be sure that your hosting provider is not a reseller to receive quick support. And I've found two nice hostings:

1. M6.net . I still have a large plan there, and it runs well. The advantage (or disadvantage) is Plesk! with ability to create independent users with own limits. I like this for some projects. Although, not much of traffic 3000Gb or something like this.

2. IX Web Hosting . No Plesk, own custom control panel, and it works quite good. Maybe not so XP-styled like Plesk, but powerful. 24/7 Support via Live Chat - awesome ! These guys can answer your questions, ready to dig server logs for you. I was impressed. What can I say - I host ASP.NET Cafe there and some other sites. Also, they offer a lot of marketing credits (AdSence, MicrosoftAd, Yahoo! , Miva and others - about $500 in coupons). I'm against Pay-Per-Click Ads, but for free...
A lot of space and traffic. And special thing - 8 dedicated IP's with middle hosting plan (about $9/month). Yes, you can access this site using IP: 98.130.27.45

I still have 3 web hosting accounts, and IX account is the best now for me (and price and quality), M6 is cool because of Plesk (if you need subusers accounts)... and one Linux hosting, but this is another history. Currently I'm not creating new PHP or Ruby driven web sites.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   ASP.NET | Hosting
Actions: E-mail | del.icio.us | Kick it! | DZone it! | Permalink | Comments (0) | Comment RSSRSS comment feed

LOL

Friday, 18 January 2008 08:01 by dmitriy

from here http://www.coleman-cartoons.com

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Main
Actions: E-mail | del.icio.us | Kick it! | DZone it! | Permalink | Comments (0) | Comment RSSRSS comment feed

asp.net themes and custom controls

Sunday, 13 January 2008 09:32 by dmitriy

There are very nice thing in asp.net called themes. This is a folder, located under App_Themes, inside this folder you can put images, css files and .skin files. The skin file allows you to set some asp.net controls properties theme-wide. It looks like
<asp:Button runat="server" BackColor="#ff46a1" BorderWidth="1px" BorderColor="#666666" ForeColor="#666666" BorderStyle="Solid" />
But what to do with custom controls? When you are writing custom control you need to do several things:

First thing you need to do - add line to assemblyinfo.cs,
[assembly: TagPrefix("SampleNamespace", "sample")]
to define tag prefix for your control.

Now you can use <#@ Register... inside your skin file, and write in skin file something like this:
<sample:SampleControl runat="server" BackColor="#ff46a1"
BorderWidth="1px" BorderColor="#666666" ForeColor="#666666" CustomImageProperty="images/bg.gif" BorderStyle="Solid" />

This is good, but one problem exist. Skin file allows you to setup images, and these images are relative to theme directory. But CustomImageProperty by default remains relative to page, and this is a problem. How to solve it? We need to use [UrlProperty()] attribute in our custom control. UrlPropertyAttribute shows asp.net that this property is a path, and in case of skins should be substituted. This way path will be relative to theme's folder, and we are happy.

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   ASP.NET
Actions: E-mail | del.icio.us | Kick it! | DZone it! | Permalink | Comments (0) | Comment RSSRSS comment feed

Completely free PDF .NET library written in C#

Tuesday, 8 January 2008 05:48 by dmitriy

Sometimes ago, I was looking for PDF library. Most of .net PDF libraries cost about $400-$800 and really good products. But my project budget was very-very small. And I start to think about own PDF library... Thank God, I have not had time to begin. And found this library. It was about 0.8 version. It's amazing! Works very good, and completely managed. Right now we have 1.0 Release. Why it is so good ? PDFsharp is the Open Source library that easily creates PDF documents from any .NET language.
The same drawing routines can be used to create PDF documents, draw on the screen, or send output to any printer.

First look at license you can found at pdfsharp.com :

PDFsharp is Open Source.
You can copy, modify and integrate the source code of PDFsharp in your application without restrictions at all. .... and so on

I just want to vote for this project. I've it used for quite complicated project, and no bug was found in this library. Thanks to PDFSharp team.

What is bad? No help files... But if you are smart you understood it. If need help, you can ask me, and maybe we can make a deal.

Download from this page PDFSharp-1.0.898.zip (1.92 mb)

Currently rated 3.7 by 3 people

  • Currently 3.666667/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   ASP.NET | C# | Main
Actions: E-mail | del.icio.us | Kick it! | DZone it! | Permalink | Comments (0) | Comment RSSRSS comment feed

HOWTO: Use Conditional attribute to make custom actions during debug

Sunday, 6 January 2008 08:11 by dmitriy

Sometimes we need to make some write to logs, trace, and maybe limit some features during debug. It's good to know that in debug mode we have precompiler identifier DEBUG is set. So, first of all you can try #if #endif construction. IMHO, it's not very good to use #if directive. If there are something better. Conditional attribute. It can be applied to any method that returns void. Why void? Because the method call ignored if the condition is not fulfilled. The method can be static or not.

[Conditional("DEBUG")]
static void DebugMethod()
{
}

So, this is the best way to make some job in DEBUG configuration. Also, it can be used to make different build configurations.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   C#
Actions: E-mail | del.icio.us | Kick it! | DZone it! | Permalink | Comments (0) | Comment RSSRSS comment feed