You are hereC#

C#


rahul's picture

ASP.NET sets the transfer encoding as chunked on premature flushing the Response

Well, I discovered this problem and its solution sometime earlier. However lately, a couple of my colleagues approached me for advice with the same issue, and I thought of writing a blog post for the same.

In a nut-shell, the problem is that ASP.NET transfers the data to the client in chunked encoding (Transfer-Encoding: chunked), if you prematurely flush the Response stream for the Http request and the Content-Length header for the Response is not explicitly set by you.

rahul's picture

Assertions in .NET - The Assert class

No doubt Visual Studio provides extensive Unit Testing framework. Plus there are feature-rich third-party frameworks (e.g. NUnit) available for Unit Testing your .NET code.

However, I was disappointed by lack of .NET support for Assertions. As you might be able to recall, Assertions guarantee that a given expression evaluates to a true value. If it doesn't, the Assertion fails and languages have their own ways of dealing with failed assertions.

rahul's picture

Coolite - Ensuring appropriate inclusion of script files for Custom Controls

Working on a custom Window control derived from Coolite Window control, I wanted to ensure that my script file for the custom Window gets included at an appropriate place in the page header before the ClientInitScript for my custom control.

rahul's picture

Specifying Run time Connection parameters for Crystal Reports using Pull Model

I was having considerable problem figuring out a way to specify the connection parameters for my Crystal Reports at runtime that used the Pull model for stuffing data. The problem was that I needed to use a different runtime connection than what was configured for the report at design time. And everytime I did so, the report threw up the form asking the user to fill in the connection parameters (I was using ASP.NET web-based reports but the approach below works on desktop also). Needless to say, this was utterly unprofessional.

rahul's picture

An Ajax Toolbar for ASP.NET Crystal Reports

I blogged yesterday here, regarding fetching the total Number Of Pages in an ASP.NET web-based Crystal Report in the code-behind. My original motive for doing that was replacing the default Crystal Toolbar with a custom one.

rahul's picture

Get Number of Pages in an ASP.NET crystal Report

This is the first of a couple of blog entires I am writing for web-based ASP.NET Crystal Reports. Both of these blog entires concentrate on having more control over the actual Report Generation to be able to replace the default Crystal Report toolbar, with a custom one, that integrates better with the overall design of your web application.

rahul's picture

Enums in Javascript

UPDATE: An updated and enhanced version of this technique is available here:
Enums in Javascript - Part 2

 

Basically, the title says it all. So, without wasting any time, let's see an example of an enum in Javascript.

rahul's picture

Coolite Control Validation

I have been a big fan of Coolite/ExtJs frameworks. ExtJs provides the client-side framework for Web 2.0 applications that I did not believe was possible, until I actually saw & used the ExtJs library. Simultaneously, the Coolite team has done an excellent task of seamless integration of the pure client-side javascript (that is ExtJs) with the powerful services & features of ASP.NET on the server side.

rahul's picture

Chess

Chess is an application developed in .NET 2.0 with C# by my students Rahul Gupta and Karandeep Maini of DIET, Karnal, as part of their Training in 5th semesters of their B.Tech. (CSE) courses.

rahul's picture

Online Exam

Online Exam is an application developed in .NET 2.0 with C# by my students Pankaj of GIMT, Kurukshetra, and Mithun of DIET, Karnal, as part of their Training in 5th semesters of their B.Tech. (CSE) courses.

Online Exam ScreenshotThe application provides Administration facilitiesfor managing Questions in the database.