TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
T
NA
5
0
How to access a properties file???
Jul 13 2006 1:45 AM
Hi,
I am developing a web application in ASP .net using C#. I have a form that displays the contact information fetched from the database. But my requirement is - the connection string should be fetched from a file (like the properties file that we have in Java) which stores all the connection strings for different database server types. This connection string is fetched by a connection class that will use the information from the file to create a connection object usign which the database is accessed. I know how to access this file in java but since I'm new to .net, I'm stuck here. Can anyone please help me accesss this properties file??
Also, is the funtion performed by .ini file same as a properties file? So, if I use an ini file, how to I access it to retrieve the connection string ?
In java, we have Resource Bundle that can be accessed as
ResourceBundle bundle = ResourceBundle.getBundle(<properties filename>);
then using this object you can access the key-value pair in the file.
Is there anything similar to this in ASP .net?? How do i access it ???
Please help!!!!!
Reply
Answers (
1
)
regarding page load and page prerender event
SEnd Image File