Adodb.stream LoadFromFile not working

I am trying to execute following javascript on my button's OnClientClick event, but the code in line 4 doesn't execute.
Could someone help me to find out where the problem is.

function upload2()
{
    var BinaryStream = new ActiveXObject("ADODB.Stream") //line 1
    BinaryStream.Type = 1;                                                 //line 2
    BinaryStream.Open();                                                    //line 3
    BinaryStream.LoadFromFile("d:\\temp\namrata.jpg");      //line 4
    var what = BinaryStream.Read();                                    //line 5
    BinaryStream.Close();
}
param4rAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ahoffmannConnect With a Mentor Commented:
does you browser policy (security settings) allow to read from local filesystem?
0
 
gops1Commented:
Add one more "\" here

BinaryStream.LoadFromFile("d:\\temp\\namrata.jpg");      
0
 
param4rAuthor Commented:
I am sorry but actual code does contains two slashes e.g.
BinaryStream.LoadFromFile("d:\\temp\\namrata.jpg");

but did not work. Please help
0
 
param4rAuthor Commented:
how to check that
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.