a) To do this go to solution explorer, right click over the project sln to add a new item, a Add New Item Dialog box appear in fort of you.
b) from Add New Item Dialog box choose Application Configuration File.
Step 2:- In app.conf file define Oracle Connection.
Ex:-
Step 3:- Code for accessing this define connection string in .cs page.
Ex:-
using System.Data.OracleClient;
OracleConnection con = new OracleConnection ( System.Configuration. ConfigurationManager.AppSettings["OracleConnection"].ToString());
No comments:
Post a Comment