I am currently new in asp.net and mvc3. I need to add class to connect to system.data.sqlclient and some class to connect to other dll. I couldn't call the class. It is in AppCode (Not APP_CODE) and couldn't call it from controller, view and model. Please somebody help me..
Asked
Active
Viewed 302 times
0
-
show us your class declaration ( namespace also) – Shyju Aug 02 '12 at 12:56
1 Answers
0
Do you have the class's namespace as one of your 'using' statements? Is your class public?
EDIT:
You are not able to use your class because it is an 'abstract' class. You need to either implement a class that inherits from your abstract class and you that, or make your class not abstract.

Chris Knight
- 1,448
- 1
- 15
- 21
-
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Configuration; namespace hr { public abstract class DataAccess { private const string REFERENCE_CONNECTION_STRING_KEY = "Reference.Connection"; public static string ConnectionString { get { return (string)ConfigurationSettings.AppSettings[REFERENCE_CONNECTION_STRING_KEY]; } } } } – indigomike7 Aug 02 '12 at 13:48
-
-
Thx. I've succeeded. I made the APPCODE not APP_CODE cause APP_CODE is executed after MVC. Now i could make any C# Class I need. Thx so much.. – indigomike7 Aug 03 '12 at 03:57
-
If this was helpful to you, would you mind upticking my answer and/or accepting my answer? This way I can get credit and the question will be closed. Thanks. – Chris Knight Aug 03 '12 at 06:10