Using JavaScript with Microsoft.NET

Discussion in 'JavaScript' started by TimTree, Jan 10, 2007.

  1. #1
    I have a Web Page using VB.NET and need to use JavaScript to obtain information from the Web Page and write it to a file on the users workstation.

    For example, there will be around 30 label controls on the web page and I will need to obtain the text from each of these and write the information to a text file on the users hard drive.

    Firstly, Is this possible ?

    Secondly, How on earth do I do it ? Does anybody have a simple example ?

    Thanks very much for your help.

    Tim.
     
    TimTree, Jan 10, 2007 IP
  2. rays

    rays Active Member

    Messages:
    563
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Hello Friend,
    This is possible, but i guess there will be lot of issues about compatibility .....

    firstly an ActiveX component come to my mind.. you need to do some googling for that..

    Right now i can suggest you this much only..

    All the best
     
    rays, Jan 12, 2007 IP
  3. MattD

    MattD Peon

    Messages:
    161
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Javascript on all the major browsers will not let you access the local user's file system. This is because its a huge security risk if any old random web site could just access your hard drive as soon as your visited it!

    A work around could be to have the user POST the contents of the fields back to the server, have the server process the fields (i.e. do whatever you want with it), then simply return the file back to the user with content disposition so they get prompted to download the file.
     
    MattD, Jan 14, 2007 IP