:::: MENU ::::

Convert List to ObservableCollection Extension Method

Today we found one more interesting thing of converting List to ObservableCollection , Its something you will need regularly when you are working with WPF / Silverlight application – because ObservableCollection typically automatically synchronized when its get updated ! Here is the code may helpful to  you ! , Its extension method to convert into […]

Add www prefix for windows hosting

Ok ! Here you go – something interesting related to URL rewriting for Windows hosting to add WWW prefix .  Recent conversation with SEO Expert leads me to understand that vnypatel.com and www.vnypatel.com are different for SEO and Page Ranking ! So , I did tried to achieve www prefix for my website finally that […]

301 Redirect – Using Global.asax

Recently came across new query of redirecting website to new domain , and the trouble was we don’t have control over domain management. Real problem was the hosting doesn’t allow web.config based changes or .htaccess , Finally come across global.asax and piece of code that worked out for me. private void Application_BeginRequest(Object source, EventArgs e) […]

Check Model State Errors

Recently faced new error in MVC3 Project related to Model State , While checking “ModelState.IsValid”  it was always return false , I wasn’t sure whats going wrong with my ModelState Finally got small piece of code that worked out fine for me ! Here it is ,  var errors = ModelState .Where(x => x.Value.Errors.Count > […]

Distinct with LINQ

Here is one more LINQ Problem. Let’s think of scenario having record as below ProductId:1 , ProductName=”Product 1″ , CategoryId=2; ProductId:2 , ProductName=”Product 2″ , CategoryId=3; ProductId:3 , ProductName=”Product 3″ , CategoryId=1; ProductId:4 , ProductName=”Product 4″ , CategoryId=1; ProductId:4 , ProductName=”Product 5″ , CategoryId=2;` And we want the records of Product 1,Product 2, Product 3 […]

Removing Back Button on jQuery Mobile

While creating web using JQuery Mobile I recently faced issue header comes with back button which is not needed. There is a quick and easy way to disable it by adding data-backbtn=”false” to your header <div data-role=”header” data-backbtn=”false”> <h1>Sample Text </h1> </div> Happy coding !

Repair SQL Server 2008 R2 Suspected Database

Just a day before , come across new issue of database . for some reason database found in suspect mode ! and that was horrible moment. After some search , we got brief idea that , database can go in suspect mode for many reasons like improper shutdown of the database server, corruption of the […]