Geeks With Blogs
AzamSharp Some day I will know everything. I hope that day never comes.

Some times you have different projects under one application. And those projects have their own virtual directories. You may be running one website and want to pass the user's information to other website which is run in a different virtual directories. If you use Session then you will find out that Sessions got lost when they reached the destination application. In ASP.NET 2.0 you can make use of the Profile object and pass the values from one application to another. The reason is simple that it stores the values in the database and hence its available for the other application. All you need to do is to keep the application name attribute and the connectionstring attribute for the profile configuration same and then your application will be able to access the Profile object.


add name="ConnectionString"

    <profile defaultProvider="MyProfileProvider">

add connectionStringName="ConnectionString"
        applicationName="MyApplication" name="MyProfileProvider"

add name="FirstName"/>
add name="LastName"/>        

powered by IMHO 1.3

Posted on Friday, March 10, 2006 6:45 PM | Back to top

Comments on this post: Maintaining state between virtual directories

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Mohammad Azam | Powered by: