Microsoft KB Archive/309496

= INFO: Performing Inline Data Binding with the ObjectList Control =

Article ID: 309496

Article Last Modified on 6/14/2002

-

APPLIES TO


 * Microsoft Mobile Internet Toolkit 1.0
 * Microsoft Visual Basic .NET 2002 Standard Edition
 * Microsoft Visual C# .NET 2002 Standard Edition

-



This article was previously published under Q309496



SUMMARY
This article illustrates how to use an ObjectList control to perform data binding within a template. The code samples in this article demonstrate how to perform data binding in the ItemDetails, Item, and AlternatingItem templates.

When you use an ObjectList control and perform inline data binding within a template, you must cast container objects to perform data binding correctly. This casting is required because the Microsoft Mobile Internet Toolkit uses the TemplateContainer class, which generates a generic template object. Because the object is generic, you must cast the template to the appropriate type when you perform data binding.

Visual Basic .NET Sample
'>

-or-

'> 

Visual C# .NET Sample
'> 

-or-

'> 

Visual Basic .NET Sample
'> 

-or-

'> 

Visual C# .NET Sample
'> 

-or-

'> </mobile:TextBox>

Keywords: kbinfo kbdatabinding kbtemplate kbservercontrols KB309496

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.