Archive

Archive for December, 2008

Sayin’ Good Bye to 2008

December 31, 2008 Imran Akram Leave a comment

Well then, its December 31 and I guess its time to say good to 2008 here.

Thankfully, it’s been a good year for me and my family — apart from just a few glitches offcourse.  Just wish the world would become a peaceful place to live at times but this wish doesn’t seem likely to become a reality as the days and years tick by. Those who are mainly responsible for all the mess have received a boot too I just hope that they understand the message that is as clear as the sun shine. They should know that the boot wasn’t just another suicide attack or assault or anything alike. It was a clear cut indication that the people who they posed as rescuing actually hate them as much as anything. In a matter of few days, they are going to say good byes to their authorities that they have misused to much so often. But I just wish these people could just sit down once and think what they’ve done. I’m amazed at times that how they dont even manage to feel one once of guilt in their guts. I guess thats why they’re managing to prolong their miserable existence on the planet.

Anyhow I’m going to sit down and think about my life and before that I just got to pay my homage to Muntader al-Zaidi, who did some thing that nobody could so far and made such an ever lasting impression to express how the whole world feels about the Bush administration.

I hope and I pray that the upcomming adimnistration is smart enough to understand what that ‘Boot’ meant and I sure do hope that Mr. Bush also gets the meaning of that by the end of year 2009.

Wishing every buddy a very happy new year in advance with just a few hours left in this year 2008.

Categories: Life Tags: ,

How to use OrderBy() for multiple columns in EntitySpaces?

December 31, 2008 Imran Akram Leave a comment

You can pass multiple columns in like this:-

collection.Query.OrderBy(collection.Query.ProductID.Descending, collection.Query.CategoryID.Ascending)

How to manipulate Session in Http Handlers

December 26, 2008 Imran Akram Leave a comment

There is a common issue that you can’t manipulate session objects in http handlers, the files with ASHX extension :) Well normally you can read the contents in the session via context.Session but you can add/remove/modify that in there. So how do you do this:

The answer is simple: Just implement the IRequiresSessionState interface. It doesnt have any method to implement so you dont have to worry about any details, this just notifies the runtime that Session can be manipulated in this context. So your class declaration would look something like this:-

public class SetLabels : IHttpHandler, IRequiresSessionState
{

A Nice Javascript Calendar Control for your applications

December 17, 2008 Imran Akram Leave a comment
Javascript Calendar/DateTime Picker control

Javascript Calendar/DateTime Picker control

I got this nice little gadget from a friend of  mine who also didnt know where it originally came from. This one’s made by Nick Baicoianu in 2006 and distributed under the GNU license. It had problems with Firefox 3 where it wasn’t showing anything in the dropdown for the years. Upon closer inspection I found out that it was using the getYear() function which was returning 3 digit values for years in Firefox 3 — So you had to either detect it first and add 1900 to it but this wasnt a very good looking solution to me so I started looking for other options and I came up with the getFullYear() function. It returns the proper 4 digit year notation in all browsers. So now its compatible with IE 7, FF2, FF3, Chrome, Opera and Safari as well.

Its a handy little gadget to have in your arsenal. I like it very much. Hope you’ll like it as well.

P.S: The download contains the include folder which has the js and css files for the calendar.

Download the Code

How to use TinyMCE in ASP .NET?

December 16, 2008 Imran Akram 2 comments

howdy everyone,

well, its been quite a few days since I dropped something on my blog, been eXtreeemly busy these days. Did any one missed me?? :D

OK, today I got this little test application for you people who are wondering: “how to use TinyMCE in ASP .NET?”. Trust me, its very simple and very straight forward.

Here’s how I used TinyMCE in my application:-

I just added this in the head tag.

<script language=”javascript” type=”text/javascript” src=”tinymce/jscripts/tiny_mce/tiny_mce.js”></script>
<script language=”javascript” type=”text/javascript”>
tinyMCE.init({
mode : “textareas”,
theme : “simple”
});
//you can also used “advanced” for themes
</script>

After that just put a multiline textbox in and it will take the form of a feature rich WYSIWYG editor.

You can also ’skin’ this as well. By default the download comes with two skins, one is the advanced and the other a much simpler one.

Download the code