asp.net.ph

Skip Navigation LinksHome > Getting Started > ASP.NET Base Types > Converting Types

Converting Types

Getting Started   ASP.NET Base Types


Conversion is basically the process of changing the type of an object into another.

In many cases, an application may need a value of one type to be used differently. Conversions enable expressions of any given type to be suited to the needs of the application.

A common scenario involves fetching a value from a data source that, in most cases, is returned as a generic Object, yet needs to be treated as a string, an integer, a floating-point value, or otherwise.

The following examples illustrate this concept, showing several of the various ways by which type conversion is employed in such situations.

Navigating thru the Rows of a DataTable
Run Sample | View Source
Editing Items with Validation in DataList
Run Sample | View Source
DataGrid ItemDataBound Event Example
Run Sample | View Source

Let’s briefly explore the key concepts and methods used to convert types in those samples.

More ...
Back to top


© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note