Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have the following piece of code that is supposed to open a file in a new browser window.

 

sb.Append("<SCRIPT>");

sb.Append("window.open('DemoFiles/" + strFilename + "');");

sb.Append("</SCRIPT>");

 

Response.Write(sb.ToString());

 

 

sb is a StringBuilder object

Reports is the name of the folder where i want to the files to be created

strFileName is the name of the file that i want to open

 

The user clicks a button and the file is created in the folder and opens when i build and browse from the visual studio.NET application. When i try to navigate to the form from a browser the forms appears but when i click the button the file is created in the folder but does not automatically open like it does in visual studio.

 

i would greatly appreciate any suggestions

Regards,

cathiec

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...