Main | August 2006 »

July 26, 2006

Form Authentication

July 25, 2006

As a working mom, think about this ...

“If you surrender completely to the moments as they pass, you live more richly in those moments.?

Anne Morrow Lingbergh

July 21, 2006

Build dynamic controls upon administrors configuration

I've been working on an application which have event date time on all pages. This of course should be changed every year. And the allowance for each event might be different year to year too. As a support person, I am just tired of these tedious things. I'd rather build a new one for them.

In the new system, the admin would have the ability to configure the application by himself. This would include date and time of the events, how many teams are allowed for each school and how many members for each team. And the cool thing is all the other public registration pages and reports would be changed immediately. I don't need to go through all of them and change one by one. I don't need to worry about that I still might forget some which are supposed to be changed even though I've been tried hard. You know what? Relief!!! That's what I feel right now even though there is still a long way to finish all my coding. But I already pass the most hard part. Yeah!

Apply template in .net applications

Want to let your pages have identical look? Yah, why not? But how?

My first attempt is to use web user controls at top, bottom and also having one for side menu. It works! My customers like my design. So what's wrong I have to look for another alternative?

The problem with this implementation is I have to register all the user controls in every aspx pages and create properate tags for each of them. When you have many pages in your application, you could image how bothering this could be! Plus this is costly for future maintenance.

I got to find another way to do this, I told myself. And I diving into my R&D world. Finally I find one which is easy to implement and easy to apply. I am so excited!!!!

Here is the way. You implement a master page with all fancy looks you want, header, footer, side menus. And then all other page inherit it instead of Page. That's it! Sound easy? Yes. I do satisified with this one.

July 19, 2006

Create X Number of TextBox at Runtime

----------------------------------- Below is the contribution I made------------------------------------------

Clean Up when the number of textbox was changed
By ? on Wednesday, July 19, 2006 (PST)
If we don't cleanup everytime when the requrested number of textbox was changed, error or messy would be expected. Below is my solution:

private void cleanUp()



ltlReturnData.Text = "";


private void txtTBCount_TextChanged(object sender, System.EventArgs e)




July 17, 2006

.NET and FireFox & Netscape

FireFox and Netscape seams not working well with .NET ListBox web control. What should be a good alternative? Or what can I do to make the application looks good to these two browsers?

How to compare db field of "text" data type?

Given a table with id which is auto number, category, description which is "text". How could I know if the database already have an identical record before I try to insert a new one?

Error Message:

The text, ntext, and image data types are invalid for local variables.

Testing Code:

declare @desc text
set @desc = 'description'

declare @cat_id int
set @cat_id = 21

if exists (select pid from position where cat_id = @cat_id and description = @desc)
print 'yes'
print 'no