1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

how can I attach database to my website

Discussion in 'C#' started by kharearch, Sep 28, 2008.

  1. #1
    I am using database in my website. But don't know what are the steps to upload database. Can somebody tell me in detail ? Please tell me Connection string also , and where I have to set connection string. Can I set in aspx file at the place of setting connection string for local server. I am using vb.net language for asp.net. Thanks.
     
    kharearch, Sep 28, 2008 IP
  2. vihutuo

    vihutuo Well-Known Member

    Messages:
    1,511
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    180
    #2
    The connection string should be in web.config file The connection string should be declared in the web.config file as follows

    <connectionStrings>
    <remove name="ASPNETDBConnectionString"/>
    <add name="ASPNETDBConnectionString" connectionString="Data Source=Your Server Name ;Initial Catalog=Your Database Name;User ID=Your username;Password=Your password;" providerName="System.Data.SqlClient"/>
    </connectionStrings>
     
    vihutuo, Sep 29, 2008 IP
  3. dinomflorist

    dinomflorist Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you can put connection string in every your asp.net page
     
    dinomflorist, Sep 29, 2008 IP