Image representing the Snippets category

Measuring the Size of an Image with C#

Published 20 years ago

It can be useful to be able to retrieve the Height and Width of an image file you have on disk. The following snippet shows you how to do that:

Read on ...
Image representing the Snippets category

How Do I Check If a Number Is Even Or Odd in ASP?

Published 20 years ago

Use this snippet to check whether a given number (passed in as numberToCheck is even or odd.

Read on ...
Image representing the Snippets category

Preventing a Page from Being Cached by Browsers and Proxy Servers

Published 20 years ago

Add the following code to the top of your ASP page to prevent it from being cached by the browser or any intermediate proxy or caching server. This will force the browser to retrieve a new copy of the page, everytime it needs to display it.

Read on ...
Image representing the Snippets category

How Do I Detect If the Current User is Logged In?

Published 20 years ago

This snippets demonstrates how to check whether a user is logged in or not. The code also shows how you can extract the UserData from the Ticket that is retrieved from the User Identity.

Read on ...
Image representing the Snippets category

A Write-Only Property in C#

Published 20 years ago

This sample code shows how to create a simple Write-Only string property in a C# class.

Read on ...
Image representing the Snippets category

A Read-Only Property in C#

Published 20 years ago

This sample code shows how to create a simple Read-Only string property in a C# class.

Read on ...
Image representing the Snippets category

A Property in C#

Published 20 years ago

This sample code shows how to create a simple string property in a C# class.

Read on ...

Mobile: False

Crawler: True

I: False