shakti5385
Feb 16th, 2007, 12:00 AM
Hi all :wave:
I want to get the connection string from the config file
but i am confused here
I make a code in the VB.NET but what about the c#
See my code in the VB.NET
Public Property ConnectionStringName() As String
Get
Return _ConnectionStringName
End Get
Set(ByVal value As String)
If value Is Nothing Or value = "" Then
Throw New Exception("Can not set null value in Connection String!!!")
End If
_ConnectionStringName = value
_ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings(value).ConnectionString
End Set
End Property
I want to get the connection string from the config file
but i am confused here
I make a code in the VB.NET but what about the c#
See my code in the VB.NET
Public Property ConnectionStringName() As String
Get
Return _ConnectionStringName
End Get
Set(ByVal value As String)
If value Is Nothing Or value = "" Then
Throw New Exception("Can not set null value in Connection String!!!")
End If
_ConnectionStringName = value
_ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings(value).ConnectionString
End Set
End Property