Playing with List Controls using jQuery

You all must be knowing, I am fan of jQuery. The kind of neat and clean code and the power provided by jQuery at Client side scripting is unmatchable.

List Controls are one of the most used form controls. And we all know that manipulating these controls from JavaScript always have been a tough task.

In this post I’ll be discussing about accessing List controls and manipulating it with the help of jQuery. Hope you all like it and also will able to apply with other controls as well.

Continue reading

Single Sign On between sub domains : Forms Authentication

Today, I am going to discuss one of the feature, that I was working last few days and spent sleepless nights at office and Home as well. Here I am going to discuss Single Sign On (SSO) feature and every other developer implements SSO on some or other day.

So Actually I was having two applications. The requirement was like, user logins from one application and on clicking a link it is navigated to another application. So when user clicks on the link it redirected to application2, it checks, whether the user is authenticated or not. If authenticated it can access the application2 else get redirected to first application for Authentication, And once authenticated again directly reaches the second application.

Continue reading

IsCrossPagePostBack : Cross page PostBack

Download sample from here

Last few days, I was working on one of my module in my web application. During writing code, I came accorss one property IsCrassPagePostBack of Page Class. I have seen this earlier but never tried to dig. So I thought of exploring it and here I am sharing my findings with you all.

First, Let’s start from beginning. We know when we submit a page, entire form data with hidden fields, including view state is posted to the server. One must be using IsPostBack property a lot. It is false when page loaded first time but returns true if any postback takes place. Whenever we click any server side control like button, linkbuttons etc or any other control with autopostback true. All the data including hidden field, View State etc.. is posted to the server and available for processing at codebehind. Continue reading…

Generics and Constraints over Generics

In this post,  I am going to discuss about Generic Classes and bit more on this.  Just for a smooth start,

“Generics were introduced in .NET 2.0, which provides us a way to create Classes/Methods/Types and many more without specifing the specific type of parameters. Parameters must be provided at the time of creating the instances. So we can say Generics are only a blueprint/templated version and actual type is defined at Runtime.”

So lets first create a simple Class say Point Continue reading…

Received Microsoft MVP(Most Valuable Professional) Award – ASP.NET/IIS

Today is really one of best days in my life. Few hours back I recieved a mail from MVP program, that I’ve been awarded MVP status in ASP.NET/IIS for 2011. It’s really a great achievement for me. I would like to thank to all my readers and supporters.

This year is very special to me, as I got MVP status from www.codeproject.com in the beginning of the year. Now I received it from Microsoft.

Now I am really feeling blessed and honored. I also would like to say “Thanks” to all my readers and supporters. Also would like to name a few friends Abhijit, Kunal , thatRaja, Abhshek, Srinandan,  Sudeep and many more…. and some other blog friends  Pete O Hanlon, Alan Beasley, Petr Pechovic and many others, who provided their candid feedback that helped me in better writing/blogging.

Again a tons of thanks to all of you.

Cheers,

Brij

Could not load file or assembly ‘PresentationCore’ or one of its dependencies. An attempt was made to load a program with an incorrect format. : A solution

Few days back, I was migrating my application for VS2008 to VS2010 and it was done successfully except  some people started running the application. They faced the error as below

Could not load file or assembly ‘PresentationCore’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

I tried to diagnose the problem and tried to find a solution.<!–more Continue reading… –>

So whenever you  upgrade to VS 2008 to VS 2010 and also upgrade ASP.NET version to 4.0. And if your website hosted on IIS, when you open your VS 2010 IDE it prompt a message asking to upgrade to asp.net version to 4.0. When you say yes it upgrades the version at IIS.

So let’s come back to our original problem. When I diagnosed I found the machine was having 64bit OS.

And at IIS, there is setting “Enable 32-bit Applications” at application pool level that is by default set false . So if you are having 64 bit OS and your application target 32-bit applications then this property must be true.

So how to set it. I have included the images for IIS7.  So first you need to know, which application pool your virtual directory points. So to check this

Goto -> cmd prompt -> type inetmgr -> click on your virtual directory and click on basic settings

Basic settingsNow you can see the Red oval that that is the name of Application pool set for this directory.

Now click on Application pool-> Click on DefaultAppPool -> and click on Advance settings.

App pool advance settings

Here you can see Red oval, I have set Enable 32-bit Applications to true.  Now restart the IIS.

Now run your application and it must be working.

Cheers,

Brij

ASP.NET: Asynchronous Programming

Click here to download the sample code

Introduction:

Have you ever tried using Async pages in asp.net? Did you ever explore it in
respect of ASP.NET?

If No. This is the article for you. In this, I will be discussing, what is Async
programming? what are the benefits? Async in respect of ASP.NET and its uses
and lots more.

Async programming:

In a literal meaning, Asynchronous operation means that a process operates independently of other processes. If there are multiple operations, All that can be handled different processes/thread without waiting to complete the other ones. So here in coming sections, we will be discussing, how Asynchronous programming comes into the picture in ASP.NET.

Async Programming in ASP.NET:

Normally the kind of websites that we make are not scalable enough that could have been. These websites are very limited and confined. ASP.NET provides us a way to develop our websites more scalable. Continue reading…

Error While Serailize/De-Serailize DateTime in JSON format : A Solution

Sometimes back, I was working on one my modules in my application. Here I had an of a Class which has some properties of DateTime type. Actually I was serializing the object using JavaScriptSerializer to serialize it in JSON format but later could not be able to deserialize it again.

So I thought of digging deep to this problem. So  I will be discussing it with an example. Let’s have a class Continue reading…

Recieved my CodeProject MVP Certificate

My MVP Certificate

Today, I received my CodeProject MVP certificate. It’s really a great feeling and feeling blessed. First of all, Thanks a lot to all of my readers and supporters. Without their continuous feedback and support, It could not have been possible for me. I’ll also thanks to CodeProject to provide the such a great platform to all the developers, so that we share our daily problems, show our expertise and help others.

This also reminds me, what all I have done previous year, learn from it and do better in coming time. I’ll always to try to share my knowledge at various communities, platform and will expect your support 🙂

Again, Thanks to all of my friends (Abhijit, Kunal, Rahul, Petr, Marcelo… and many more) , all of my supporters and readers..