<asp:DragOverlayExtender ID="DragOverlayExtender2" Enabled="true" TargetControlID="floatCalendar"
            runat="server" ProfileServiceID="profile" ProfileProperty="calendarPosition" />
        <asp:DragOverlayExtender ID="DragOverlayExtender3" Enabled="true" TargetControlID="floatLogin"
            runat="server" ProfileServiceID="profile" ProfileProperty="loginPosition" />
        <asp:ProfileService ID="profile" runat="server" AutoSave="true">
        </asp:ProfileService>
    <anonymousIdentification enabled="true"/>
    <profile enabled="true">
      <properties>
        <!--DragOverlayExtender控件保持位置时,自动按string类型保存-->
        <add name="calendarPosition" allowAnonymous="true" type="string" />
        <add name="loginPosition" allowAnonymous="true" type="string" />
      </properties>
    </profile>//calendarPosition能定义为别的类型吗?ProfileService的实现原理是怎样的过程?

解决方案 »

  1.   

    如果是dll就保存在bin中。如果是cs就保存在code中。
    string是因为 type="string" ;你可以改变,但是如果你调用的控件只识别string就要小心了。
      

  2.   

    我的问题就在于为DragOverlayExtender控件保持位置时,type只能定义成string,是什么原因?
    我尝试定义成int,位置就保持不了了。跟踪程序发现calendarPosition的值是"100,200"这样的形式。
    是不是说,type定义成什么类型由特定的控件决定?
    对于DragOverlayExtender控件而言,他保持位置值到properties的过程是怎样的?
      

  3.   

    DragOverlayExtender   这个控件是在什么上面的啊?
      

  4.   

    Profile在webconfig中只能定义为基本类型,string,int...
    如果想使用自定义类型,需要自己提供Provider
      

  5.   

    唉,貌似你们都没理解我的话。
    简单说,我在问:
    使用DragOverlayExtender控件时,为它指定的Profile为什么一定要是string类型?