Transferring Cookies from WebBrowser to WebClient

I have prepared many web scrapping application and crawlers. Few of them were developed using WebClient and others were with WebBrowser control of .NET (see my previous article to Get and Set Cookies .NET WebBrowser Control). Recently I got stuck in a situation where I need features of both tools. That is WebClient and WebBrowser.

So my idea was to use WebBrowser control and pass on the session to WebClient when WebClient features are required. Keep on reading

Getting started with Hybrid (iOS, Android, Windows Phone and Windows) App in Apache Cordova and Visual Studio 2015

Microsoft has come up with  very useful tool integration this time in Visual Studio 2015. They have integrated Apache Cordova tools with this version of Visual Studio. You can download it it using online installer. But if you want to download it offline installer get it from my previous article Download Visual Studio 2015 RC offline installer (ISO).

Apache Cordova tools were available separately for Visual Studio 2013 also and you can download the from this link. Keep on reading

Create Extension Methods in C# and use same Extension Method in object of different types

If we want to add our own method to any type, we generally drive another type from this and add our method. This is one way but is not good if we only want to add one method which is not going to use private properties of our type object.

Another option could be to add Extension Method to any type. This way you can add your method to any type and it will be accessible in the type object you have created. Keep on reading

Resize image with transparent background maintaining transparency

Today I faced a problem when I was resizing image in one of my project. Actually he problem was that I was using image resize code from one of my old project which were working fine earlier but not today. It is making my image background dark black which I obviously don’t need.

Reason for that code not working today is that earlier I always used jpg images for resizing and for that my old code was fine. Today when I tested same code with transparent background png file it gave me that awkward result. Keep on reading

URL Rewriting in ASP.NET web form using URL Rewrite module of IIS

Whenever we talk out SEO friendliness of any website first thing we should think about is the URLs. URLs play big role in any website’s SEO score. If you have SEO friendly URLs half of your work is done (don’t take it literally, I am just giving example).

So for creating SEO friendly URLs first thing we have to do is install URL Rewrite extension on our IIS. You can get one from here. You will find different option for downloading and installing extension. You can choose if you want to install using web platform installer or standalone installer. You will also get samples at the bottom of the page linked above. Keep on reading