ASP.NET Web development server

Last post 05-09-2008 10:55 AM by NC01. 4 replies.

Sort Posts:

  • ASP.NET Web development server

    05-09-2008, 1:41 AM
    • Loading...
    • aerojade
    • Joined on 05-09-2008, 5:36 AM
    • Posts 2

     I have ceated a Website which when launched, has a textBox and a Button. If i enter the path of a word document in the texbox and press the button, the File is taken, and converted to a filestream. Then, this file stream is read onto Internet explorer using Response.ContentType and Response.Binarywrite(buffer). Hence it opens the filestream and also recognizs that it is a word file content an opens it accordingly.  However, it runs the ASP.NET development server everyime. Hoe can i perform the same steps mentioned above without using the web development server?

     

    I awnt it o just be a client side program,  

  • Re: ASP.NET Web development server

    05-09-2008, 6:28 AM
    • Loading...
    • blodfox777
    • Joined on 07-12-2007, 12:30 PM
    • Posts 40

    Hi aerojade,

    I think you should use ActiveX. hope this helps

    solution1:
    var cmd = new ActiveXObject('WScript.Shell');
    cmd.Run('winword.exe C:\\test.doc');
        
    solution2:
    var wrd=new ActiveXObject("Word.Application");      
    wrd.visible=true;
    wrd.Application.Activate();
    wrd.Documents.Open("C:\\test.doc");
    wrd=null;

     

    Regards!
    Lance
    -- "Mark As Answer" If my reply helped you --
  • Re: ASP.NET Web development server

    05-09-2008, 6:30 AM
    • Loading...
    • blodfox777
    • Joined on 07-12-2007, 12:30 PM
    • Posts 40

    VBScript

    <SCRIPT LANGUAGE=vbscript>
     Sub B1_Onclick()  
      Set objWord = CreateObject("Word.Application")
      objWord.Visible = True                     
      objWord.Documents.Add "c:\a.doc"
     End Sub 
    </Script>

    Regards!
    Lance
    -- "Mark As Answer" If my reply helped you --
  • Re: ASP.NET Web development server

    05-09-2008, 6:45 AM
    • Loading...
    • aerojade
    • Joined on 05-09-2008, 5:36 AM
    • Posts 2

    thanks for responsding lance. However.. i am not trying to open a file. I am trying to open a Filestream of a word document. Hence it is necessary that it open in IE since it is the only one that can understand a stream and open it. 

  • Re: ASP.NET Web development server

    05-09-2008, 10:55 AM
    • Loading...
    • NC01
    • Joined on 08-26-2005, 3:33 PM
    • Posts 6,867
    • TrustedFriends-MVPs

    The only way to do that is server-side. You could open a new window using the client-side window.open function with that code in it, but that is about the only way from the client.

    NC...

     

Page 1 of 1 (5 items)