Jun 30, 2009

Get query string value using JavaScript

Here is the JavaScript function getQuerystring which finds the key form query string and returns the value.

* <summary>
* Get the querystring value
* </summary>
* <param name="key">A string contains the querystring key</param>
* <param name="defaultVal">Object which get returns when there is not key</param>
function getQuerystring(key, defaultVal) {
if (defaultVal == null) {
defaultVal = "";
key = key.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regex = new RegExp("[\\?&]" + key + "=([^&#]*)");
var qs = regex.exec(window.location.href);
if (qs == null) {
return defaultVal;
else {
return qs[1];

Jun 22, 2009

Register for PHP Developers Day

Microsoft invites you to this exclusive session on Microsoft InterOp initiatives tailored for open source developers to create cutting-edge business applications.







Build Mission Critical Applications on the Microsoft Platform using Eclipse


Nahas Mohammed, Technology Advisor, Microsoft

Microsoft has delivered multiple technologies that focus on interoperability with non-Microsoft and Open Source technologies. Learn how to use Eclipse tools today to build Silverlight applications that run on PCs and Macs, how to work in a cross-platform environment and yet integrate your solution with your designer team. Also get to know about Microsoft's commitment to openness with the Azure Services Platform.


jQuery - the write less do more javascript library


Deepak Gulati, Lead Architect,

jQuery has gained tremendous popularity in little over two years. It aims to allow web developers to write clear, concise code that cleanly separates the behavior of a page from its design without having them fret over details of cross-browser Javascript development. With its formal inclusion into Microsoft's Ajax stack, it is bound to become an important tool in an ASP.NET Web
Developer's toolbox.
We'll begin with a whirlwind tour of some advanced features of Javascript and then move on to using jQuery for:


Efficient DOM traversal and manipulation


Using a unified event handling mechanism
across browsers


Increasing visual and functional appeal of your web-pages with special effects and plugins


MS SQL Business Intelligence with mySQL


Praveen Srivatsa, Director, Asthrasoft

Have your data residing on mySQL but want to leverage MS SQL server capabilities to build Business Intelligence solutions? Then this is the right session for you. This session looks at leveraging your existing investments in mySQL and leveraging the Reporting and Analysis Services from MS SQL server to extract data out from your mySQL data store to build meaningful dashboards. It looks at how we can integrate SQL Reporting Services and use SSIS to harvest the data from mySQL. It also looks at how we can replicate or sync data between MS SQL Server and mySQL to be able to share the relevant data across these databases.


Trouble Ahead? Know Your Project Warning Signs! How Successful Leaders Recognize and Deal with Project Warning Signs


Sanjay Dugar, instructor, ESI International

This session is run by ESI and provides detailed guidance on conducting project health checks, what warning signs to look for, how to find them and finally, when to pull the plug on a project. For more than 25 years, ESI International has helped many of the world's most successful organizations-including Fortune 1000 companies and nearly every major agency of the United States federal government-align strategies, build talent and achieve organizational goals. To date, ESI has helped more than 850,000 technical and specialized professionals around the world improve the way they manage their projects, contracts, requirements and vendor relationships.


Jun 13, 2009

Long word breaks the UI

Hi All,

Working with long word into Web application some times break the UI. There always be a question for How to break long words?? As a long word without space kills your user interface.

I found the reason, in general when you system is tested by QA first thing he is going to break if you don’t limit the size and then it try to break UI with adding a loooooong space less word :)

There can be lots of other solutions, like create function which finds the long word and break it out. But I like is Regx, yes the regular expression is very optimum, but you have to learn them which is not like eating piece of cake :)

Following is the Regx which validate the text box and allow user to add 35 character long word although it seems to be not possible :)

<asp:RegularExpressionValidator ID="regNoLongWords" runat="server" ControlToValidate="txtText"
ErrorMessage="Word is too long" Display="None"

Have fun with Regx !!!

Jun 12, 2009

Tech.Ed India 2009

Its a great pleasure to make announcement that Tech.Ed 2009 its now in Ahmedabad, its FREE event and you should go and attend it. If you missed TechEd Indian 2009 at Hydrabad then you can now attend it in Ahmedabad, Gujarat, India on June 20, 2009 Saturday at Rock Regency.


You may get change to meet/talk to two MVPs Pinal Dave and Jacob Sebastian, who will also going to attend this event. If you are interested then register here it’s based on First Come First Serve.

Jun 8, 2009

Best way to hiding Telerik Grid Column

Hi All, I was just looking into list of function while applying some logic for show/hide column of Telerik it provides two methods to do so.

public GridColumn FindByUniqueName(string UniqueName);
public GridColumn FindByUniqueNameSafe(string UniqueName);

As name suggest first method is not safe, it can throw GridExceptions if no column is found, where second one is returning null if no column is found. Along with these tow method, it have one property name UniqueName; this property helps FindByUniqueName and FindByUniqueNameSafe to find the column. So now we don’t need to remember the column id also we can now easily change the sequence of column as they are not referring with unique name.

<telerik:GridTemplateColumn UniqueName="Clients" HeaderText="Clients">

And server side write following code.

GridColumn gridColumn = dgTest.Columns.FindByUniqueNameSafe("Clients");
if (gridColumn != null)
gridColumn.Visible = false;

Jun 3, 2009

Viewstate in dynamic Control

Hi All,

There is general problem to having issue with ViewState in dynamic control.

I have posted one article Code Project you can find it here.