aspxtreme

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.



Books and more ...


Suggested Reading

Need a break ?


More ...
Back to top

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

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

You can help support aspxtreme