Category Archives: ASP.NET

Merge Rows in GridView – One Column or Multiple Columns

I few days earlier my client asked me if it is possible to merge rows with same repetitive data so that the reports become more readable. Please refer to the screen shots below to get a better picture of their … Continue reading

Posted in ASP.NET, C#, Knowledge Sharing | Leave a comment

What are the Major Improvements in .Net Framework 4.0

Diagnostics and Performance – Starting with the .NET Framework 4, you can get processor usage and memory usage estimates per application domain. Garbage Collection – This feature replaces concurrent garbage collection in previous versions and provides better performance. Code Contracts … Continue reading

Posted in ASP.NET, ASP.NET, Interview Questions, Knowledge Sharing | Leave a comment

MVC4 error- Unable to complete operation. The supplied SqlConnection does not specify an initial catalog

I was trying to do my hands dirty today with MVC4. I was following MvcMovieStore example. Following everything correctly till “Accessing Your Model’s Data from a Controller”, i was stuck with this error. Struggling to this i found that by … Continue reading

Posted in ASP.NET, Entity Framework, Knowledge Sharing, MVC, Troubleshooting | Comments Off

Creating tamper proof Url in asp.net – a way to prevent spoofing and forged HTTP requests

Consider the following URL- http://www.mysite.com/orders.aspx?id=10 Now the problem is that anybody having this link can view more data than authorised and required by simply changing the value of id to say 16,17,18,19… Another problem could be that script tags could … Continue reading

Posted in ASP.NET, C#, Knowledge Sharing, Troubleshooting | Leave a comment

How to load a server side image in Silverlight Image control – another way to reduce XAP size

Direct references to images should be avoided in a Silverlight project as it makes the XAP file heavier. An alternative could be to have the images on server and load images by creating bitmap of the image by using the … Continue reading

Posted in ASP.NET, C#, Knowledge Sharing, Silverlight, Troubleshooting | Leave a comment

VS 2010 and web.config transformation

My current project is going through a chain of frequent QA and pre-production deployments. During each deployment I need to change a lot of web.config settings which are specific to QA or pre-production server. VS 2010 web.config transformation made my … Continue reading

Posted in ASP.NET, Knowledge Sharing | Leave a comment

File upload run time error – Maximum request length exceeded

If you are getting this error while uploading file on the server, add following configuration setting in web.config- <configuration> <system.web> <httpRuntime maxRequestLength=”102400″ executionTimeout=”1200″ /> <!– 102400 in KB is 100 MB, 1200 is in seconds–> </system.web> </configuration>

Posted in ASP.NET, Knowledge Sharing | Leave a comment