Click here to Skip to main content
15,887,683 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Random 8 digit number Pin
Richard Deeming28-Jul-14 6:22
mveRichard Deeming28-Jul-14 6:22 
GeneralRe: Random 8 digit number Pin
byka29-Jul-14 1:51
byka29-Jul-14 1:51 
GeneralRe: Random 8 digit number Pin
byka29-Jul-14 1:53
byka29-Jul-14 1:53 
GeneralRe: Random 8 digit number Pin
Richard Deeming29-Jul-14 2:14
mveRichard Deeming29-Jul-14 2:14 
GeneralRe: Random 8 digit number Pin
byka29-Jul-14 2:31
byka29-Jul-14 2:31 
GeneralRe: Random 8 digit number Pin
Richard Deeming29-Jul-14 5:56
mveRichard Deeming29-Jul-14 5:56 
QuestionHow to create ASP.NET database driven dynamic website, Database Connection, Tutorial Pin
Biplob Singha Shee28-Jul-14 2:01
Biplob Singha Shee28-Jul-14 2:01 
SuggestionRe: How to create ASP.NET database driven dynamic website, Database Connection, Tutorial Pin
Richard Deeming28-Jul-14 2:50
mveRichard Deeming28-Jul-14 2:50 
Although it would be possible to read the connection details from a custom XML file, why not simply use the built-in support for configuring connection strings[^]?

web.config:
XML
<configuration>
    <connectionStrings>
        <add
            name="MyConnectionString"
            providerName="System.Data.SqlClient"
            connectionString="server=SERVER-NAME;database=DB-NAME;uid=USER-NAME;pwd=PASSWORD"
        />
        <!--
        For more examples of connection strings, see:
        http://www.connectionstrings.com/
        -->
    </connectionStrings>
</configuration>


Code:
VB.NET
Imports System.Configuration
...
Dim connectionStringSettings As ConnectionStringSettings = ConfigurationManager.ConnectionStrings("MyConnectionString")
Using connection As New SqlConnection(connectionStringSettings.ConnectionString)
    ...
End Using




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: How to create ASP.NET database driven dynamic website, Database Connection, Tutorial Pin
Biplob Singha Shee28-Jul-14 3:20
Biplob Singha Shee28-Jul-14 3:20 
GeneralRe: How to create ASP.NET database driven dynamic website, Database Connection, Tutorial Pin
Richard Deeming28-Jul-14 3:46
mveRichard Deeming28-Jul-14 3:46 
QuestionWeb Crawling Pin
JaypalSinh9026-Jul-14 19:56
JaypalSinh9026-Jul-14 19:56 
AnswerRe: Web Crawling Pin
Kornfeld Eliyahu Peter26-Jul-14 20:33
professionalKornfeld Eliyahu Peter26-Jul-14 20:33 
GeneralRe: Web Crawling Pin
Sibeesh KV29-Sep-14 1:47
professionalSibeesh KV29-Sep-14 1:47 
GeneralRe: Web Crawling Pin
Kornfeld Eliyahu Peter29-Sep-14 2:08
professionalKornfeld Eliyahu Peter29-Sep-14 2:08 
GeneralRe: Web Crawling Pin
Sibeesh KV29-Sep-14 2:12
professionalSibeesh KV29-Sep-14 2:12 
Questionasp.net Pin
naralasaimanoj25-Jul-14 6:20
naralasaimanoj25-Jul-14 6:20 
AnswerRe: asp.net Pin
sumitkmr6225-Jul-14 8:20
sumitkmr6225-Jul-14 8:20 
AnswerRe: asp.net Pin
thatraja25-Jul-14 16:03
professionalthatraja25-Jul-14 16:03 
AnswerRe: asp.net Pin
Swinkaran3-Aug-14 16:41
professionalSwinkaran3-Aug-14 16:41 
AnswerRe: asp.net Pin
Sibeesh KV29-Sep-14 1:49
professionalSibeesh KV29-Sep-14 1:49 
QuestionMobile phone detection Pin
Member 1087082524-Jul-14 19:01
Member 1087082524-Jul-14 19:01 
AnswerRe: Mobile phone detection Pin
kashyapa7826-Jul-14 21:47
professionalkashyapa7826-Jul-14 21:47 
Questiongenerate id for some another user in asp.net Pin
Member 1096700123-Jul-14 11:00
Member 1096700123-Jul-14 11:00 
GeneralRe: generate id for some another user in asp.net Pin
thatraja24-Jul-14 2:32
professionalthatraja24-Jul-14 2:32 
AnswerRe: generate id for some another user in asp.net Pin
David Mujica24-Jul-14 2:56
David Mujica24-Jul-14 2:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.