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.

Author Paul Hayman

Paul is the COO of kwiboo ltd and has more than 20 years 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 ?

05/Feb/2007 21:06 PM

Add Comment

Name
Comment
 

Your comment has been received and will be shown once it passes moderation.