I just finished installing Windows 7 on my home laptop in dual boot mode with Windows XP.

To partition my hard drive, I used Partition Master 3.5 Home Edition, it’s a lesser known freeware but it works seamlessly.

Windows 7 has easier and quicker installation process , plus it got all the hardware drivers on my machine. . It certainly boots up faster than Vista (which was my biggest headache using it). Looks promising to me.

We know that cross domain ajax calls are not possible from javascript, but come’on we live in virtual world and every law can be bent if we can (remember Morpheus from ultra cool Matrix ;-) )

Ok, I found  here on this nice guy’s blog under Cross-Domain Communication with IFrames.

I have actually used it and it works like a charm. I made a simple javascript function to get the anchor values , actually I used anchors to pass values using URL as if passing URL variable.

For example if I want to pass one variable then I would do :

http://www.yourdomain.com#action=foo#

For two variables :

http://www.yourdomain.com#action=foo#action2=foo2#

Two JS function, one for getting anchor value and second for resetting URL to it’s original form.

function getAnchor(name) {

url = window.location.href;
var varlen = name.length + 2;
var start = url.indexOf(”#” + name) + varlen;
var length = url.indexOf(”#”, start) – start;

var value = url.substr(start, length);
return value;
}

function resetAnchor() {
url = window.location.href;
var hash = url.indexOf(”#”)
if (hash >= 0) {
url = url.substr(0, hash);
window.location.href = url + “#”;
}
}

I would be happy to help if you have any troubles.

Gmail in Firefox is my primary work and personal email client, so I try to make as much space available as possible for Gmail.

I use Hide Menubar add-on which hides the main menubar, then I hide all other extra toolbars and keeping only Address bar (which minimum you need anyways).

Then, recently I found Gmail Compactor Add-On which make further space available for Gmail and make it look little better than standard interface. Make sure you have Greasemonkey add-on installed before you try.

I just had a scenario where one of our client needs to consume our Asp.Net web service in their PHP host application.

Calling Asp.Net web service from PHP turned out to be easier then I thought. Here is how you can do.

First you need to download open source nusoap soap library, and put the lib folder under your application root directory. (I have renamed the folder name lib to nusoap in app directory).

The sample PHP code is below:

<?php
require_once(’nusoap/nusoap.php’);

$client = new nusoap_client(’http://www.yourdomain.com/service.asmx?WSDL’, ‘wsdl’,”, ”, ”, ”);

$err = $client->getError();
if ($err) {
echo ‘<h2>Constructor error</h2><pre>’ . $err . ‘</pre>’;
}
$param = ”;
$result = $client->call(’functionName’, $param, ”, ”, false, true);

if ($client->fault) {
echo ‘<h2>Fault</h2><pre>’;
print_r($result);
echo ‘</pre>’;
} else {
// Check for errors
$err = $client->getError();
if ($err) {
// Display the error
echo ‘<h2>Error</h2><pre>’ . $err . ‘</pre>’;
} else {
// Display the result
echo ‘<h2>Result</h2><pre>’;
print_r($result);
echo ‘</pre>’;
}
}
?>

Of course, you can do much more than this, check out samples provided in downloaded nusoap source.

I use all three popular browsers (IE, FF and Chrome) but IE is still my primary browser for development. Till final version of IE8 released I used to use FF for testing my ajax application since Firebug add-on over there is doing nice job. IE8 has built in Developer Tools window now which covers almost all feature which Firebug has, plus there are some more. Very handy to use and does the job well.

 

Since couple of months we are working on a new project based on Asp.Net 3.5 Framework which is using Backbase as a client rendering framework. Backbase provides a rich user interface which is independent of development platform. It sure has a learning curve but once you are through that phase you will see the real advantage of RAD.

If you are trying to use Backbase with Asp.Net and have any questions then I may try to answer them since we have passed that phase of sorting out initial hiccups.

Asp.Net MVC is a great framework. But, developers coming from Webforms background will find it little bit difficult not having a set of Validation controls which automatically validates form input by user. JQuery is a part of Asp.Net MVC application and I just found a nice JQuery plugin which fills the gap of Validator Controls of Webforms. It can be downloaded from here.

There are enough examples which coveres most of the routine validation needs and using it is as easy as Webforms validator controls.

Recently I had a case where an application which was working fine suddenly started slowing down and apparently there were no code changes made. After checking around at Database properties found that Recovery Model was set to “Full”. In fact it was not needed according to the backup policy as only full backup was scheduled, not at the level of transaction log.

Setting the Recovery Model to “Simple” solved the problem and application was back on acceptable performance.

Check this link to know more about Recovery Model :
http://msdn.microsoft.com/en-us/library/aa173531.aspx

I have a code which makes Ajax post using JQuery in asp.net. It worked fine in IE and Chrome but failed in Firefox. When debugged using Firebug it showed 411 “Lenght Required” error. After wasting couple of hours on google it finally turned out a kind of Jquery bug.

Normally I wrote code like:

    $.ajax({ type: “POST”,
        url: “URL”,
        dataType: “xml”,
        processData: true,
        error: function(XMLHttpRequest, textStatus, errorThrown) {},
        success: {}
    });

Looks normal and works in IE and Chrome but not in FF, to make work in FF we have to provide an empty data header like below:

    $.ajax({ type: “POST”,
        url: “URL”,
        dataType: “xml”,
        data:{},
        processData: true,
        error: function(XMLHttpRequest, textStatus, errorThrown) {},
        success: {}
    });

It is weird because there are so many other headers which we don’t pass it too and they are taken with default values and why not with data header.

Hope it will be solved in upcoming jquery releases and till then hope this helps.

I needed to align content bottom-up for one web-based IM interface, searched around but could not find a perfect solution after a while, so here is how I solved the problem:

<div style="height:400px;width:100%">

 <table style="border:0;height:400px;width:100%;overflow:scroll">

            <tr>

            <td  id="TableInner" style="vertical-align:bottom;">

            </td>

            </tr>

          </table>

</div>

In above code, key is to put a table inside a div. Vertical-Align does not work on div tag so no matter what style you apply it will never work. by default it will align top. by putting same Size of table inside div we create another container for our content. Now we can apply vertical-align:bottom to TD tag of our table. Whatever content we need to put now we put it inside that TD tag. problem solved.   The outer div around table provides the scrollbars to our content if it overflows.

In addition if you need to set scroll position of Div to bottom then following Javascript will do that:

var objScr = document.getElementById(’myDiv’); 

objScr.scrollTop = objScr.scrollHeight;

 

Hope this helps.

Next Page »