Pages

Ads 468x60px

For New Update Use this Link http://dotnethubs.blogspot.in/ Offer for you

.

Showing posts with label technical interview. Show all posts
Showing posts with label technical interview. Show all posts

Saturday 13 April 2013

latest interview questions on asp net c# for 2 years experience

latest interview questions on asp net c# for 2 years experience
Introduction :-
I have collected the best asp.net and c#.net question with answer for experience person who have two [2] years of experience in asp.net and c#.net.
Firstly any enterviewer ask to you

1 :-  How is Felling know ?
Asn :- Good ,Felling well like this you give the answer

2  :- Tell me about your self in brief ?
Good morning sir/madam.

This is Chitranjan Singh Rathore

My educational qualification are:

I have completed my 10th standard in 2002 from  Little flower school and also 12th standard in 2004.

I have completed my graduation in 2007 from Holkar science college.

I have completed my post graduation in 2010 from Medicaps Colloege indore .

Coming to my family background.

My father is a private employee in banking sector.

My mother is a housewife.

I have 1 elder sister and 2 elder brother.

My personal details are.

My strength are hardworking and truth person.

My weakness are emotional and a little shy.

My hobbies are playing cricket and indoor games.

Thank you.
3 :- What is asp.net life cycle ?

Life Cycle Events

PreInit

The properties like IsPostBack have been set at this time.

This event will be used when we want to:

  1. Set master page dynamically.
  2. Set theme dynamically.
  3. Read or set profile property values.
  4. This event is also preferred if want to create any dynamic controls.
Init
  1. Raised after all the controls have been initialized with their default values and any skin settings have been applied.
  2. Fired for individual controls first and then for page.
LoadViewState
  1. Fires only if IsPostBack is true.
  2. Values stored in HiddenField with id as _ViewState decoded and stored into corresponding controls.
LoadPostData

Some controls like:

  1. Fires only if IsPostBack is true.
  2. Some controls like Textbox are implemented from IPostBackDataHandler and this fires only for such controls.
  3. In this event page processes postback data included in the request object pass it to the respective controls.
PreLoad
  • Used only if want to inject logic before actual page load starts.
Load
  • Used normally to perform tasks which are common to all requests, such as setting up a database query.
Control events
  1. This event is fired when IsPostBack is true.
  2. Use these events to handle specific control events, such as a Button control's Click event or a TextBox control's TextChanged event.
PreRenderRaised after the page object has created all the controls that are required for rendering which includes child controls and composite controls.
  1. Use the event to make final changes to the contents of the page or its controls before the values are stored into the viewstate and the rendering stage begins.
  2. Mainly used when we want to inject custom JavaScript logic.
SaveViewState
  • All the control values that support viewstate are encoded and stored into the viewstate.
RenderGenerates output (HTML) to be rendered at the client side.
  • We can add custom HTML to the output if we want here.
Unload
  1. Fired for individual controls first and then for page.
  2. Used to perform cleanup work like closing open files and database connections.

5 :- How the request is handled by IIS ?

We give an URL to an aspx page in the browser address bar and press enter. What happens next? We get the response in terms of rendered HTML but how?
  1. We are requesting something from the browser, which means indirectly we are requesting something from the Web Server, that means IIS. IIS, based on the file extension, decides which ISAPI extension can serve the request.

    And in case of ASP.Net (.aspx) it will be aspnet_isapi_dll so the request is passed to it for processing.
     
  2. When the first request comes to the website,

    an application domain is created by the ApplicationManager class where exactly the website runs, and which creates an isolation between 2 web applications.
    Within the application domain an instance of the HostingEnvironment class is created which provides access information about the application such as the name of the folder where the application is stored.
     
  3. Next ASP.Net creates core objects like HttpContext, HttpRequest,HttpResponse.
     
  4. Finally the application starts by creating an instance of the HttpApplication Class (which can be reused for multiple requests to maximize performance).
6 :- difference between form authentication and windows authentication asp net ?
ans - Click Here
 difference between form authentication and windows authentication asp net 

7 :- what is authentication and authorization in .net ? 
ans :- Click Here 
what is authentication and authorization in .net

8 :- What is Difference between Session and Cookies  ? 

The basic and main difference between cookie and session is that cookies are stored in the user's browser but sessions can't store in user's browser. This specifies which is best used for.

• A cookie can keep all the information in the client's browser until deleted. If a person has a login and password, this can be set as a cookie in their browser so they do not have to re-login to your website every time they visit. You can store almost anything in a browser cookie.

• Sessions are not reliant on the user allowing a cookie. They work like a token in the browser which allowing access and passing information while the user has opened his browser. The problem in sessions is when you close the browser the session will automatically lost. So, if you had a site requiring a login, this couldn't be saved as a session but it can be saved as a cookie, and the user has to re-login every time they visit.
cookies are nothing but a small piece of information on the client machine. before we create a cookies we should check whether the cookies are allowed at the browser side. They are limited in a size 4k.(they are 2 types of cookies peristant cookie , and session cookies)

Sessions cookies are stored in a server memory during the client browser session.When the browser is closed the session cookies are lost.

9 :-Advantages and disadvantages of Session?
Following are the basic advantages and disadvantages of using session. I have describe in details with each type of session at later point of time.

Advantages:

  • It helps maintain user state and data all over the application.
  • It is easy to implement and we can store any kind of object.
  • Stores client data separately.
  • Session is secure and transparent from the user.

Disadvantages:

  • Performance overhead in case of large volumes of data/user, because session data is stored in server memory.
  • Overhead involved in serializing and de-serializing session data, because in the case of StateServer and SQLServer session modes, we need to serialize the objects before storing them.
Besides these, there are many advantages and disadvantages of session that are based on the session type. I have discussed all of them in the respective sections below.

Wednesday 6 March 2013

interview-questions-and-answers

Common Interview Questions and Answers
1. Tell me about yourself:
The most often asked question in interviews. You need to have a short statement prepared in your mind. Be careful that it does not sound rehearsed. Limit it to work-related items unless instructed otherwise. Talk about things you have done and jobs you have held that relate to the position you are interviewing for. Start with the item farthest back and work up to the present.
2. Why did you leave your last job?
Stay positive regardless of the circumstances. Never refer to a major problem with management and never speak ill of supervisors, co- workers or the organization. If you do, you will be the one looking bad. Keep smiling and talk about leaving for a positive reason such as an opportunity, a chance to do something special or other forward- looking reasons.
3. What experience do you have in this field? Speak about specifics that relate to the position you are applying for. If you do not have specific experience, get as close as you can.
4. Do you consider yourself successful?
You should always answer yes and briefly explain why. A good explanation is that you have set goals, and you have met some and are on track to achieve the others.
5. What do co-workers say about you?
Be prepared with a quote or two from co-workers. Either a specific statement or a paraphrase will work. Jill Clark, a co-worker at Smith Company, always said I was the hardest workers she had ever known. It is as powerful as Jill having said it at the interview herself.
6. What do you know about this organization?
This question is one reason to do some research on the organization before the interview. Find out where they have been and where they are going. What are the current issues and who are the major players?
7. What have you done to improve your knowledge in the last year?
Try to include improvement activities that relate to the job. A wide variety of activities can be mentioned as positive self-improvement. Have some good ones handy to mention.
8. Are you applying for other jobs?
Be honest but do not spend a lot of time in this area. Keep the focus on this job and what you can do for this organization. Anything else is a distraction.
9. Why do you want to work for this organization?
This may take some thought and certainly, should be based on the research you have done on the organization. Sincerity is extremely important here and will easily be sensed. Relate it to your long-term career goals.
10. Do you know anyone who works for us?
Be aware of the policy on relatives working for the organization. This can affect your answer even though they asked about friends not relatives. Be careful to mention a friend only if they are well thought of.
11. What kind of salary do you need?
A loaded question. A nasty little game that you will probably lose if you answer first. So, do not answer it. Instead, say something like, That's a tough question. Can you tell me the range for this position? In most cases, the interviewer, taken off guard, will tell you. If not, say that it can depend on the details of the job. Then give a wide range.
12. Are you a team player?
You are, of course, a team player. Be sure to have examples ready. Specifics that show you often perform for the good of the team rather than for yourself are good evidence of your team attitude. Do not brag, just say it in a matter-of-fact tone. This is a key point.
13. How long would you expect to work for us if hired?
Specifics here are not good. Something like this should work: I'd like it to be a long time. Or As long as we both feel I'm doing a good job.
14. Have you ever had to fire anyone? How did you feel about that?
This is serious. Do not make light of it or in any way seem like you like to fire people. At the same time, you will do it when it is the right thing to do. When it comes to the organization versus the individual who has created a harmful situation, you will protect the organization. Remember firing is not the same as layoff or reduction in force.
15. What is your philosophy towards work?
The interviewer is not looking for a long or flowery dissertation here. Do you have strong feelings that the job gets done? Yes. That's the type of answer that works best here. Short and positive, showing a benefit to the organization.
16. If you had enough money to retire right now, would you?
Answer yes if you would. But since you need to work, this is the type of work you prefer. Do not say yes if you do not mean it.
17. Have you ever been asked to leave a position?
If you have not, say no. If you have, be honest, brief and avoid saying negative things about the people or organization involved.< br /> 18. Explain how you would be an asset to this organization.
You should be anxious for this question. It gives you a chance to highlight your best points as they relate to the position being discussed. Give a little advance thought to this relationship.
19. Why should we hire you?
Point out how your assets meet what the organization needs. Do not mention any other candidates to make a comparison.
20. Tell me about a suggestion you have made.
Have a good one ready. Be sure and use a suggestion that was accepted and was then considered successful. One related to the type of work applied for is a real plus.
21. What irritates you about co-workers?
This is a trap question. Think real hard but fail to come up with anything that irritates you. A short statement that you seem to get along with folks is great.
22. What is your greatest strength?
Numerous answers are good, just stay positive. A few good examples: Your ability to prioritize, Your problem-solving skills, Your ability to work under pressure, Your ability to focus on projects, Your professional expertise, Your leadership skills, Your positive attitude
23. Tell me about your dream job.
Stay away from a specific job. You cannot win. If you say the job you are contending for is it, you strain credibility. If you say another job is it, you plant the suspicion that you will be dissatisfied with this position if hired. The best is to stay genetic and say something like: A job where I love the work, like the people, can contribute and can't wait to get to work.
24. Why do you think you would do well at this job?
Give several reasons and include skills, experience and interest.
25. What are you looking for in a job?
Stay away from a specific job. You cannot win. If you say the job you are contending for is it, you strain credibility. If you say another job is it, you plant the suspicion that you will be dissatisfied with this position if hired. The best is to stay genetic and say something like: A job where I love the work, like the people, can contribute and can't wait to get to work.
26. What kind of person would you refuse to work with?
Do not be trivial. It would take disloyalty to the organization, violence or lawbreaking to get you to object. Minor objections will label you as a whiner.
27. What is more important to you: the money or the work?
Money is always important, but the work is the most important. There is no better answer.
28. What would your previous supervisor say your strongest point is?
There are numerous good possibilities: Loyalty, Energy, Positive attitude, Leadership, Team player, Expertise, Initiative, Patience, Hard work, Creativity, Problem solver
29. Tell me about a problem you had with a supervisor.
Biggest trap of all. This is a test to see if you will speak ill of your boss. If you fall for it and tell about a problem with a former boss, you may well below the interview right there. Stay positive and develop a poor memory about any trouble with a supervisor.
30. What has disappointed you about a job?
Don't get trivial or negative. Safe areas are few but can include: Not enough of a challenge. You were laid off in a reduction Company did not win a contract, which would have given you more responsibility.
31. Tell me about your ability to work under pressure.
You may say that you thrive under certain types of pressure. Give an example that relates to the type of position applied for.
32. Do your skills match this job or another job more closely?
Probably this one. Do not give fuel to the suspicion that you may want another job more than this one.
33. What motivates you to do your best on the job?
This is a personal trait that only you can say, but good examples are: Challenge, Achievement, Recognition
34. Are you willing to work overtime? Nights? Weekends?
This is up to you. Be totally honest.
35. How would you know you were successful on this job?
Several ways are good measures:
You set high standards for yourself and meet them. Your outcomes are a success.Your boss tell you that you are successful
36. Would you be willing to relocate if required?
You should be clear on this with your family prior to the interview if you think there is a chance it may come up. Do not say yes just to get the job if the real answer is no. This can create a lot of problems later on in your career. Be honest at this point and save yourself uture grief.
37. Are you willing to put the interests of the organization ahead of your own?
This is a straight loyalty and dedication question. Do not worry about the deep ethical and philosophical implications. Just say yes.
38. Describe your management style.
Try to avoid labels. Some of the more common labels, like progressive, salesman or consensus, can have several meanings or descriptions depending on which management expert you listen to. The situational style is safe, because it says you will manage according to the situation, instead of one size fits all.
39. What have you learned from mistakes on the job?
Here you have to come up with something or you strain credibility. Make it small, well intentioned mistake with a positive lesson learned. An example would be working too far ahead of colleagues on a project and thus throwing coordination off.
40. Do you have any blind spots?
Trick question. If you know about blind spots, they are no longer blind spots. Do not reveal any personal areas of concern here. Let them do their own discovery on your bad points. Do not hand it to them.
41. If you were hiring a person for this job, what would you look for?
Be careful to mention traits that are needed and that you have.
42. Do you think you are overqualified for this position?
Regardless of your qualifications, state that you are very well qualified for the position.
43. How do you propose to compensate for your lack of experience?
First, if you have experience that the interviewer does not know about, bring that up: Then, point out (if true) that you are a hard working quick learner.
44. What qualities do you look for in a boss?
Be generic and positive. Safe qualities are knowledgeable, a sense of humor, fair, loyal to subordinates and holder of high standards. All bosses think they have these traits.
45. Tell me about a time when you helped resolve a dispute between others.
Pick a specific incident. Concentrate on your problem solving technique and not the dispute you settled.
46. What position do you prefer on a team working on a project?
Be honest. If you are comfortable in different roles, point that out.
47. Describe your work ethic.
Emphasize benefits to the organization. Things like, determination to get the job done and work hard but enjoy your work are good.
48. What has been your biggest professional disappointment?
Be sure that you refer to something that was beyond your control. Show acceptance and no negative feelings.
49. Tell me about the most fun you have had on the job.
Talk about having fun by accomplishing something for the organization.
50. Do you have any questions for me?
Always have some questions prepared. Questions prepared where you will be an asset to the organization are good. How soon will I be able to be productive? and What type of projects will I be able to assist on? are examples.
50. What's your current salary?
Questions about your current compensation may sound personal, but they can still be asked at interviews. Never lie or stretch the truth, as if you are found out it could jeopardize your entire application.
Answers:
My present employer pays me well outside of the norm, however I would not like to limit my job prospects by using that salary as a comparison.
As a highly valued member of the company, I am paid on the very high end of current market rates.
51 .What do you enjoy about the industry you are in?
This can be a tough question that will put you on the spot. When responding be polite, diplomatic and give a good business related answer.
Answers:
I can't really give you a accurate answer because at this time I don't know the scope of the job, it’s responsibilities, hours, etc.
The job I perform, the salary I receive and the circumstances at my current company are not really comparable to the opportunity we are discussing today. However when I consider my skill sets, academic qualifications and work experience, I am confident that a salary between £25,000 - £33,000 would be appropriate.

Thursday 28 February 2013

Technical Interview

asp.net technical interview question and answer

Interview Question and Answer For experience person

I think these questions are very helpful for the people who are trying to get the job on .NET The most common question for experience persons is

Why would you like to change the company?

1). I am looking for a more challenging career in a firm with a larger employee base such as yours.
2). Keeping in mind my career goals, the time has come for me to move onto the next rung of the ladder and make a mark for myself. This can be achieved in a company like this.
3). It is just a career move to enhance my knowledge in my own area of interest.After completion of this question only interview will go for further questions

Difference between stored procedure and function

1) . Procedure can return zero or n values whereas function can return one value which is mandatory.
2) . Procedures can have input, output parameters for it whereas functions can have only input parameters.
3) . Procedure allows select as well as DML statement in it whereas function allows only select statement in it.
4) .Functions can be called from procedure whereas procedures cannot be called from function.
5) .Exception can be handled by try-catch block in a procedure whereas try-catch block cannot be used in a function.
6) .We can go for transaction management in procedure whereas we can't go in function.
7) .Procedures cannot be utilized in a select statement whereas function can be embedded in a select statement.

Difference between Abstract and Interface

Abstract:
-Abstract class provides a set of rules to implement next class
-Rules will be provided through abstract methods
-Abstract method does not contain any definition
-While inheriting abstract class all abstract methods must be override--If a class contains at least one abstract method then it must be declared as an “Abstract Class”
-Abstract classes cannot be instantiated (i.e. we cannot create objects), but a reference can be created
-Reference depends on child class object’s memory
-Abstract classes are also called as “Partial abstract classes”
-Partial abstract class may contain functions with body and functions without body
-If a class contains all functions without body then it is called as “Fully Abstract Class” (Interface)
Interface:
-If a class contains all abstract methods then that class is known as “Interface”
-Interfaces support like multiple inheritance
-In interface all methods r public abstract by default
-Interfaces r implementable
-Interfaces cannot be instantiated, but a reference can be created

Index types in SQL Server

Clustered Index
Only 1 allowed per table physically rearranges the data in the table to confirm to the index constraints for use on columns that are frequently searched for ranges of data for use on columns with low selectivity. Non-Clustered Index Up to 249 allowed per table creates a separate list of key values with pointers to the location of the data in the data pages For use on columns that are searched for single values
A clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one clustered index. The leaf nodes of a clustered index contain the data pages. A non-clustered index is a special type of index in which the logical order of the index does not match the physical stored order of the rows on disk. The leaf node of a non-clustered index does not consist of the data pages. Instead, the leaf nodes contain index rows.

What is strong-typing versus weak-typing? Which is preferred? Why?

Strong typing: It checks the type of variables as soon as possible, usually at compile time. It prevents mixing operations between mismatched types.
A strong-typed programming language is one in which: All variables (or data types) are known at compile time There is strict enforcement of typing rules (a String can't be used where an Integer would be expected)
All exceptions to typing rules results in a compile time error
Weak Typing: While weak typing is delaying checking the types of the system as late as possible, usually to run-time. In this you can mix types without an explicit conversion.
A "weak-typed" programming language is simply one which is not strong-typed.
which is preferred depeneds on what you want. for scripts and good stuff you will usually want weak typing, because you want to write as much less code as possible. in big programs, strong typing can reduce errors at compile time.

What is the basic functionality of Garbage Collector in Microsft.Net?

The Common Language Runtime (CLR) requires that you create objects in the managed heap, but you do not have to bother with cleaning up the memory once the object goes out of the scope or is no longer needed. The Microsoft .NET Framework Garbage Collector provides memory management capabilities for managed resources. The Garbage Collector frees objects that are not referenced and reclaims their memory. You should set your references to Nothing(null) as soon as you are done with them to ensure your objects are eligible for collection as soon as possible.
Here are the list of some tasks performed by the Garbage collector: . Garbage collector reserves a piece of memory as the application starts for the managed heap.
. Garbage collector controls the managed heap memory currently used and available to an application.
. Garbage collector allocates memory for new objects within the application.
. The Garbage Collector attempts to reclaim the memory of objects that are not referenced.

What are differences between Array list and Hash table?

Ans: 1) Hash table store data as name, value pair. While in array only value is store.
2) To access value from hash table, you need to pass name. While in array, to access value, you need to pass index number.
3) you can store different type of data in hash table, say int, string etc. while in array you can store only similar type of data.

What are differences between system.stringbuilder and system.string?

The main difference is system.string is immutable and system.stringbuilder is a mutable. Append keyword is used in string builder but not in system.string.
Immutable means once we created we cannot modified. Suppose if we want give new value to old value simply it will discarded the old value and it will create new instance in memory to hold the new value.

What are the differences between Application object and session object?

Ans: The session object is used to maintain the session of each user.
If one user enter in to the application then they get session id if he leaves from the application then the session id is deleted.
If they again enter in to the application they get different session id.
But for application object the id is maintained for whole application.

What are the different types of indexes?

Ans: Two types of indexes are there one is clustered index and non-clustered index.

How many types of memories are there in .net?

Two types of memories are there in .net stack memory and heap memory.

Is it possible to set the session out time manually?

Yes we can set the session out time manually in web.config.

Can you Explain Page lifecycle in .net?

The life cycle starts when a user requests a web page through his/her browser. The Web server than process the page through a sequence of steps before response is sent back to the user's browser.
The steps are as: 1. Page Request
2. Start
3. Page Initialization
4. Load
5. Validation
6. PostBack Event Handling
7. Render
8. Unload
The below figure shows the Page Life Cycle of an ASP.NET and its controls
Page Request
The page request occurs before the page life cycle begins. When a user requests the page, ASP.NET determines whether the page needs to be parsed and compiled (therefore beginning the life of a page), or whether a cached version of the page can be sent in response without running the page.
Start
In the start step, page properties such as Request and Response are set. At this stage, the page also determines whether the request is a postback or a new request and sets the IsPostBack property. Additionally, during the start step, the page's UICulture property is set.
Page Initialization
During page initialization, controls on the page are available and each control's UniqueID are generated but not their properties. Any themes are also applied to the page.
Developers have access to the Init, InitComplete and PreLoad methods in this stage. The methods are as follows:
Init: This event is raised after all controls have been initialized and any skin settings have been applied. This event is used to read or initialize control properties.
InitComplete: The Page object raises this event. This event is used for processing tasks that require completion of all initialization.
PreLoad: Use this event if you need to perform processing on your page or control before the Load event. After the Page raises this event, it loads view state for itself and all controls, and then processes any postback data included with the Request instance.
Load
During load, if the current request is a postback, control properties are loaded with information recovered from view state and control state. The OnLoad event method is fired during this stage.
This is where you will want to set properties for all of the server controls on your page, request query strings, and establish database connections.
Validation
During validation, the Validate method of all validator controls is called, which sets the IsValid property of individual validator controls and of the page. PostBack Event Handling
If the request is a postback, any event handlers are called. The event handling for server controls occurs during this stage.
Render
During rendering, view state is saved to the page and then the page calls on each control to contribute its rendered output to the OutputStream of the page's Response property. Render is not really an event. The HTML of the page and all controls are sent to the browser for rendering.
Unload
Unload is called when the page has been fully rendered, sent to the client, and is ready to be discarded. At this point, page properties such as Response and Request are unloaded and any cleanup is performed. The cleanup includes routines such as closing database connections and file streams, or, event logging and other tasks.
Conclusion
When a Web page is requested, the server creates objects associated with the page and all of its child controls objects and uses these to render the page to the browser. Once the final stage is complete, the web server destroys these objects, to free up resource to handle additional request.

what is managed and unmanaged code ?

Code that executes under CLR environment is called Managed code for example code written in c# needs CLR Environment to execute it.
Unmanaged code is a code that can execute without any CLR environment Just like code written in c,c++ languge.

how to use multiple web.config files in asp.net application or working with more than one web.config file in asp.net application ?

Introduction:
Here I will explain how to use multiple web.config files in single application using asp.net
Description:
I attended one interview at that time they asked one question that is it possible to use multiple web.config files in single asp.net application? For that question answer is Yes we can use multiple web.config files in single web application but how? By creating web.config file in sub root folders we can use multiple web.config files in our application but each folder should contains only one web.config file. Here I will explain step by step how we can use multiple web.config files in our application...

First create one new web application that contains Default.aspx page and one web.config file. Now right click on your application and select New folder after creation of new folder right click on new folder select Add new item and add one aspx page and one web.config file to this folder that files structure like this


After that write the following code in root folder web.config file appsettings section like this
<appSettings>
<add key="rootfolder" value="Root Folder web.config"/>
<add key="test1" value="Testing the application for root folder web.config"/>
</appSettings >

  After that open Default.aspx page in root folder and write the following code

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>RootFolder web.config</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<b>
Root Folder values
</b>
</div>
<br />
<div>
AppKey value:
<b>
<asp:Label ID="lbltxt" runat="server" Text="<%$appSettings:rootfolder %>"/>
</b>
<br />
Appkey Test value:
<b>
<asp:Label ID="Label1" runat="server" Text="<%$appSettings:test1 %>"/>
</b>
</div>
</form>
</body>
</html>


Now run your application and check the output for root folder
Output

After that open the sub root folder web.config file and write the following code in appsettings section like this
<appSettings>
<add key="subrootfolder" value="Sub Root Folder web.config"/>
<add key="test1" value="Testing the application for sub root folder web.config"/>
</appSettings >
After that open ChildPage.aspx page in sub root folder and write the following code
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>SubRoot Folder web.config</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<b>
SubRoot Folder values
</b>
</div>
<br />
<div>
AppKey value:
<b>
<asp:Label ID="lbltxt" runat="server" Text="<%$appSettings:subrootfolder %>"/>
</b>
<br />
Appkey Test value:
<b>
<asp:Label ID="Label1" runat="server" Text="<%$appSettings:test1 %>"/>
</b>
</div>
</form>
</body>
</html>

Now run your application and check the output for sub root folder
OUTPUT

If you observe above outputs Default.aspx page getting values from root folder web.config file and ChildPage.aspx page getting values from subroot folder web.config file.
In this way we can use multiple web.config files in asp.net web application. I hope it helps you.Please give a feedback if you like this..
 

..




New Updates

Related Posts Plugin for WordPress, Blogger...

Related Result