TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Aman Jen
NA
141
40.6k
Declaring connection string in a class
Aug 27 2013 1:31 AM
Hi,
Declaring connection string in a class which is declared in web.config file
if do like this showing an error Non Invocable member
using System.Data.SqlClient;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;
namespace CSharpTutorial
{
public class MyFunctClass
{
string connstr = ConfigurationManager.ConnectionStrings ("myConnectionString").connectionString;
}
}
Plz help
Reply
Answers (
27
)
send sms from mobile using c# desktop application
How to bind/fetch column value(HoardingId) in alert message