Open a file in a a new window

  • Thread starter Thread starter Anita C
  • Start date Start date
A

Anita C

Hi,
On a web form, in the click event of a button I want to open a .htm file in
a new window. However I only know the path of the shortcut which points to
file that needs to be viewed in the new window. What server side code do I
use to do the above ?
Thanks a ton.
 
From your server, you can't open a window on the client's machine. What you
can do, however, is emit client side code to do that. You could just emit a
window.open script to the client, which will let you write it out in real
time, but that involves a round trip. Why not just create an input
type=button linked to a javascript function that opens the window that you
need, and spare yourself the traffic over the wire?
 
Thanks, that is what i intend to do, however I have a bigger problem in
trying to :
Read the properties of the shortcut in question the 'Target' property shows
the path of the file the shortcut points to. Is possible in asp.net to load
the shortcut and read the target property ? If so how ? A code sample will
be great.
Thanks.
 
Back
Top