You are not Logged in
Would you like to Login or Register

Today is: 11 March 2010
Check this months hot topics

Remembering position of DragOverlayExtender with Profile

You can get Atlas to store the last known position of your floating panel in the profile.

Three things you need to do to get this to work.

ProfileScriptService

In the page with the DragOverlayExtender you'll need to add a atlas:ProfileScriptService control (this is responsible for communicating with the profile back on the server) :

<atlas:ProfileScriptService AutoSave="true" ID="profileService" runat="server" />

DragOverlayExtender

You need to set the property name to store the position in, in this example my property name is PopupPosition

<atlas:DragOverlayExtender ID="EntryDetailDragExtender" runat="server">
    <atlas:DragOverlayProperties 
                TargetControlID="EntryDetailPanelContainer" 
                ProfileProperty="PopupPosition"
                Enabled="true" />
</atlas:DragOverlayExtender>

Web.Config entries

This had me baffled for a while, I knew that I had to add the property (PopupPosition) to my Profile/Properties in the system.web section:

<system.web>
    ....
    <profile automaticSaveEnabled="true" enabled="true">
        <properties>
            <add allowAnonymous="true" name="PopupPosition"/>
        </properties> 
    </profile> 
    ....
<system.web>

What I didn't realise that I needed to add another section to the microsoft.web section. See below for example:

<microsoft.web>
    ...
    <profileService enabled="true" 
                    setProperties="PopupPosition" 
                    getProperties="PopupPosition" />
    ...    
</microsoft.web>

Note: You can specify more than one property in the profileService element, simply seperate them with a ;

Alternatively, you could specify * and it will have access to all properties.

kick it on DotNetKicks.com del.icio.us digg Mister Wong YahooMyWeb Reddit Furl Spurl blogmarks
Paul Hayman Skype
Author : Paul Hayman
Published : 06 July 2006

Paul is the COO of kwiboo ltd consultant and has more than a decade of IT consultancy experience. He has consulted for a number of blue chip companies and has been exposed to the folowing sectors: Utilities, Telecommunications, Insurance, Media, Investment Banking, Leisure, Legal, CRM, Pharmaceuticals, Interactive Gaming, Mobile Communications, Online Services. Paul is the COO and co-founder of kwiboo (http://www.kwiboo.com/) and is also the creator of GeekZilla.

Comments

Karthik Vijayakumar said:

I am trying to develop a similar thing but there is not ProfileScriptService anymore with the new release. Any idea what could done to remember the position ?

February 05, 2007 - 9:06 PM

Add Comment

Enter your comment below and it will be submitted for moderation.

Your Name

Add Tag

Please enter tags for this article, seperated by semi-colon ;

View Tag's by : # articles | # views