Welcome to Bilal Haidar [MVP, MCT] Official Blog Sign in | Join | Help

April 2006 - Posts

Define an Event Handler for a HyperLink Server Control

Hello, a common question on the ASP.NET Forum is: How to define an Event Handler for a HyperLink? The solution as follows: protected System.Web.UI.WebControls.HyperLink HyperLink1; private void Page_Load(object sender, System.EventArgs e) { HyperLink1.Attributes.Add("onClick",

Modal Dialog Window Caching Problem

Hello: Suppose you open a Modal Dialog window inside your ASP.NET page. In that dialog window, you have a GridView, DataGrid, or whatever control. Do some changes on that control, you will see that the data has changed right? Ok, then close the dialog

Define Custom Events in UserControls

A very common question on the ASP.NET forums is: How to define an event in a UserControl, and process this event in the Page holding this UserControl? The answer is simple, follow this post, and you will be able to define your own events very easily.

DNN - FixLogin - Revisted

I have made slight changes on the FixLogin module in such a way, the super user or the *host* account will be able to change the *Redirect To* page online, using the DNN website. In the first version, although I had a Setting variable to change that page,
Posted by BilalHaidar [MVP] | 0 Comments
Filed under:

Traverse a TreeView in ASP.NET 2.0

I'm working those days on an application, which relies a lot on TreeView Control in ASP.NET 2.0. However, it is not just working with it out of the box, I am forced to go down and program with the control. However, I was trying to traverse a Tree and

The Observer Pattern

The pattern I am going to talk about today is the Observer Pattern. Another new and cool pattern to discuss. Observer Pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated
Posted by BilalHaidar [MVP] | 1 Comments
Filed under:

Visual Studio 2005 Express Free For Ever

I read a great post from some time, that Microsoft has decided to make the Visual Studio 2005 Express Editions free for ever!! Read more here: Visual Studio Express Editions are Free Forever Regards

The Strategy Pattern

This is the first post for me in the field of Design Patterns. I am new to this field, but decided to summarize each pattern I cover in my great book called: Head First Design Patterns . The Strategy Pattern: Defines a family of algorithms, encapsulates
Posted by BilalHaidar [MVP] | 0 Comments
Filed under:

ASP.NET 2.0 Training Center

I wanted to share with you a great website I passed by today: ASP.NET 2.0 Training Center Has lots of great resources through articles, webcasts, and others. Make sure to visit that site. Regards

Paging With ObjectDataSource in One Trip

This post assumes you have the previous post on the DataObjectTypeName and ObjectDataSource . Usually, when we want to allow paging when we are using ObjectDataSource, we should enable paging in both the Data-Bound Control (GridView an example) and the

DataObjectTypeName and ObjectDataSource

For most of you using the ObjectDataSource, you must have passed by DataObjectTypeName property of the ObjectDataSource. I have been working with it for a while, but thought of sharing with you the beauty of that property. Usually, ObjectDataSource uses

ASP.NET 2.0 Localize Control

In my research on Localization in ASP.NET 2.0, which is my topic of the next Community Night Session at Microsoft Office in Beirut, I passed by the <asp:Localize> control in ASP.NET 2.0. This control inherits from the Literal Control. It is mainly

DotNetNuke Module - FixLogin

In a new DotNetNuke 3.2.2 website I am working on, supposedly will be online this coming week, I faced the following problem: DotNetNuke uses by default a Login Page. So, when users come to sign in, if authenticated they will be redirect to the page they
Posted by BilalHaidar [MVP] | 2 Comments
Filed under:

Happy Easter - Part 1

I would like to wish all the world's Christians, and mainly our brothers and sisters, the Lebanese Christians, having their Easter this week, a Happy Easter, with the hope and wish of having more peace and wealth all over our beloved country Lebanon.
Posted by BilalHaidar [MVP] | 0 Comments
Filed under:

Define a Custom Event inside UserControls

If you are working with either a new custom server control or a normal web user control, this is the proper way of adding an event that can be handled by the parent control of the child control you are develping: Add the following to the control (Server

Handle MasterPages' Control Events in Content Page

Hi: While working on a project having MasterPages, Content Pages, TreeView Controls, Themes, etc ... I was faced with the following situation: In one of the master pages in my application, I had a TreeView, and a custom menu, in a sense, once a button

System Restore in Windows Server 2003

As you know, Windows Server 2003 comes with no System Restore feature. I had been fighting for two days to rescue my VPC, unforunately, when I was able to enable System Restore in it, I found there were no restore points :(. Anyways, I was able to rescue

Back to Lebanon

I have arrived to Lebanon 2 days ago. The Lebanese MVPs and I spent a great time in London and Cambridge City. We had great sessions on C# 3.0, Windows Vista, Web Services, SQL Server 2005 and many other valuable sessions especially those given by the