none
How to avoid an HTML object to load everytime the ASP Page reloads itself RRS feed

  • 问题

  • Hi. I have an ASP.Net webpage where i use Microsoft Agent Control through the HTML Object tag as follows:

     

    <OBJECT id=AgentControl 

        style="LEFT: 0px; TOP: 0px; Width: 36px; Left: 0px; height: 40px;"  

        codebase="../../../../#VERSION=2,0,0,0" 

        classid="CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F" VIEWASTEXT></OBJECT>

    <!-- Speech and Agent Files Respectively.  There numerous languages available for D/L.-->

     

    <OBJECT WIDTH=0 HEIGHT=0 CLASSID="CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575"

         codebase="../../../../#VERSION=6,0,0,0" id=Lernout_&_Hauspie_TruVoice_American_English_TTS_Engine1></OBJECT>

    I am spawning the object on page load calling the init() function using VBScript as follows:

    <script language="VBScript" type="text/vbscript">
    Dim Merlin
    Dim LoadChar
    Dim CharLink
    Dim temp
    Dim loaded

    function speak(sound)
    Set CharLink = Merlin.Speak (sound)
    end function

    Public Sub Init()
    On Error Resume Next
    Set LoadChar = AgentControl.Characters.Load ("Merlin", "C:\Windows\msagent\chars\vrgirl.acs") 'Change to proper root depending on OS.
    minimize()
    InitializeTimer()
    Set LoadChar = AgentControl.Characters.Load ("Merlin")
    Set Merlin = AgentControl.Characters ("Merlin")  
          Merlin.Show
          Merlin.MoveTo 1000,100
    End Sub 
    </script>

     

    So the problem is, everytime the page reloads, the Character Object also reloads. How to avoid this? 

    Please help me. I have tried all sort of things.

     

    Regards

    Danish

    2010年7月5日 6:18

答案

  • Hi,

    When the page reload, of course all control in the page would be refreshed. It is not partial postback.

    So if you want to implement the partially refresh, you can try ajax, such as updatepanel in asp.net and trigger a partial postback.

      


    Microsoft Online Community Support
    2010年7月7日 2:25

全部回复

  • Hi,

    When the page reload, of course all control in the page would be refreshed. It is not partial postback.

    So if you want to implement the partially refresh, you can try ajax, such as updatepanel in asp.net and trigger a partial postback.

      


    Microsoft Online Community Support
    2010年7月7日 2:25
  • The Font Size too small
    2010年7月8日 2:58