Results 1 to 2 of 2

Thread: using the global .asax

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2001
    Location
    Bangalore ,India
    Posts
    240

    using the global .asax

    heloo al
    am very mnuch new to asp .net ...am starting my new project ...
    can any one help me in how to get the connnection string form the global .asax file ?
    which is the best site for learning asp .net ?
    ,,,
    senthil

  2. #2
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    Dublin, Ireland
    Posts
    262
    I would recommend you store your connection string in the web.config file under appSettings:-

    <configuration>
    <appSettings>
    <add key="ConnString" value="server=servername;Database=dbname;uid=;pwd=" />
    </appSettings>
    <system.web>
    ....rest of web.config stuff here

    The ConnString can be retrieved in your asp.net code with the following method:-

    ConfigurationSettings.AppSettings("ConnString")

    There are many good websites for learning asp.net. I would recommend 4guys and dotnetjunkies as well as asp.net:-

    http://www.4guysfromrolla.com
    http://www.dotnetjunkies.com
    http://www.asp.net

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width