Archive for the ‘General’ Category.
30 December, 2006, 04:15
I posted an article to The Code Project for an image control. The basic idea for developing that is to write e-mail addresses as images using various formatting options on web applications.
Labels are generated as images instead of text, to have more privacy without any configurations and without HttpHandlers
ImageLabel is an ASP.NET web control for generating labels as images. You might want to do that for providing security for e-mail crawlers or to disallow copy paste of the text. Many similar controls have implemented as HttpHandlers, so you need more configuration to make them work. However this control does not need any configuration. You just need to use just like any other asp.net control like Label. Almost all of the label formatting options are included, like font size, backcolor, forecolor. Although this is not implemented as a CAPTCHA control, that functionality can easily added to image generation method.
ImageLabel Control at CodeProject
I think it is a good way to understand page and control life cycle using that control, if you are wondered about them. Beside that, if you like the article you can vote for me if you want to
Browser View :

Visual Studio Design View :

Tags:
.Net,
ASP.Net,
C#,
code,
codeproject,
control,
Projects,
webcontrol Category:
.Net,
ASP.Net,
C#,
General,
Projects |
1 Comment
17 December, 2006, 04:30
Collections are the most used elements in the programs. Indexers helps us to access the elements of a collection. Although you might not have implemented indexers, you have used indexers a lot. Whenever you have an array or a collection object you use indexers.
Implementing indexers is done by coding “this[TYPE]” property. The object implementing the indexer can be any type of object, however the object is mostly a collection object. For simplicity I haven’t implemented as a collection object here. Most of the indexers are integers, but it can be any type of indexer.
C# 2.0 has come with a new keyword “yield”. You can return an enumerable object using yield keyword with the combination of “return” keyword, rather than building the collection and returning it.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
namespace properties
{
class Program
{
static void Main(string[] args)
{
User u1 = new User();
Console.WriteLine(u1[56]);
User u2 = u1["use","of","indexers", "explained", "with", "multiple", "arguments"];
foreach (string name in u2.GiveUserNames())
{
Console.WriteLine(name);
}
Console.Read();
}
}
public class User
{
public string this[int a] // type to return usually the collections element type
{
get
{
return string.Format("Somebody has called me with index {0}", a);
}
}
private string[] userNames; // just to demonstrate params
public User this[params string[] items]
{
get
{
userNames = items;
return this;
}
}
public IEnumerable<string> GiveUserNames()
{
foreach (string i in userNames)
{
yield return i;
}
}
}
}
Output :
Somebody has called me with index 56
use
of
indexers
explained
with
multiple
arguments
_
Those feature are really useful if you are dealing with your own types.
10 December, 2006, 05:28
Scott Guthrie and his team at Microsoft has released a new product code named WPF/E. It looks like a flash replacement for Internet Explorer browser with some additional features. First of all, it only works with Internet Explorer, I think if they don’t give support to other platforms and other browsers, although WPF/E seems really great, it might not be popular as flash.
We want some standards to look our applications look the same on every platform. I have never programmed flash scripts before and I am sure that Microsoft will provide that easy to developers. However if it is only for IE, I don’t think many of the developers will use it.
I don’t understand that new approach as well. The products like Virtual Earth or Photosynth and this only works for Internet Explorer because they use Activex. I don’t know if they will support other platforms but since it’s developed on ActiveX I don’t think they will give any support.
6 July, 2006, 23:22
I can’t find time for doing my todo list. I am trying to do as much as I can, however I still have unread books, unwatched movies, unread mails etc. Maybe I am not planning very good, however while reading my rss feeds, I saw that some other people are complaining about that. Actually this is an endless work to complete. Everyday some new ideas, new products appears. While working on a project, I can’t find a time for every field of this ocean. Here are the hot topics to learn for the next year as stated in Howard‘s blog.

I have a list of rss feeds. So I try to read them. I just make a quick review of the content, and print interesting, potentially useful articles. Than read it whenever I am away from my computer, on the road especially. Hard copy reading is a lot faster than screen reading.
Nowadays beside the warehouse project that I am currently involved, I am trying to catch the wave of windows vista, actually .Net Framework 3. But I also want to do some atlas, javascript stuff, xp, read more books, watch more movies, have more time with my family, friends and more and more…
Blogs about continous education:
Rob Caron: Continous Education
Howard van Rooijen : Continous education
18 June, 2006, 23:30
Synergy is a great program that lets you share a single mouse and computer for multiple computers. You still need monitor for working.
Synergy
Settings window
Start dialog
Systray in action
Info

4 January, 2006, 22:52
First sentence of programming world…
I will share my programming experiences, you will meet coding side of my fabulous life…
Console.WriteLine("Hello World");