Suresh Behera

The Microsoft .Net Junkies

News

Blogroll

Reading

November 2007 - Posts

Option Strict On disallows late binding from Visual Studio 2005

If you get this surprise error after converting the asp.net project.
This is what you need to do

 Original
<%# Container.DataItem("ID"
) %>

Change to
CType(Container.DataItem, DataRowView)("ID"
).ToString

This solve your problem.

To set Option Strict in the integrated development environment (IDE)
On the Tools menu, choose Options.

Open the Projects and Solutions node.

Choose VB Defaults.

Modify the Option Strict setting.

To set Option Strict on the command line
Include the /optionstrict compiler option in the vbc command.

 

 

Suresh Behera

Posted: Nov 21 2007, 04:10 PM by Suresh Behera | with 4 comment(s) |
Filed under: ,
More Posts