Open a file in a a new window

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.
 
C

Chris Jackson

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?
 
A

Anita C

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top