Using ADO.NET in Web Custom Control

  • Thread starter Thread starter Jeremy Ames
  • Start date Start date
J

Jeremy Ames

Is it possible to use ADO.NET in a custom control? I am trying to create a
control and I try using the system.data.sqlclient namespace and when I try
to compile it can't find that namespace. Please help!
 
System.Data.SqlClient is a namespace NOT a class... move
one level down. For example,
System.Data.SqlClient.SqlConnection.

Also, make sure you have a reference to System and
System.Data in your solution.

-Fabricio
 
I was trying to use it as a namespace, not a class. When I start typing
System.D the auto complete box does not even show Data in the list. I have
also tried referencing just System but that does not help me.

System.Data.SqlClient is a namespace NOT a class... move
one level down. For example,
System.Data.SqlClient.SqlConnection.

Also, make sure you have a reference to System and
System.Data in your solution.

-Fabricio
 
Back
Top