Tuesday, March 27, 2012

Calling SqlDataSource from DLL instead of CodeFile C#.

Hello,

Is it possible to call a SqlDataSource from a DLL within a method like you can from the CodeFile? I'm getting this error: The Name SqlDataSource1 does not exist in the current context when trying to call it from within a method defined in a DLL. Thanks!

It would be much much better if you can post your code here.

The Name SqlDataSource1 does not exist in the current context

Most probably you didn't declare this parameter before you refer to it.

Is it possible to call a SqlDataSource from a DLL within a method like you can from the CodeFile?

Well, i think it totally depends on whethere you have passed that sqldatasource value to your dll.If yes, you can call that sqldatasource within your dll.

BTW, remember to add necessary dlls and using proper namespaces in your dll, thus sqldatasource class may not be identified.

Hope my suggestion helps

No comments:

Post a Comment