2 Replies - 1681 Views - Last Post: 12 March 2007 - 05:13 AM Rate Topic: -----

#1 venkatzeus  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 08-March 07

Content Header Problem?

Posted 11 March 2007 - 11:52 PM

Hi ,

I do have a page in which I want to open an xml file in a button click. In the button click am opening an aspx page through Javascript location.href(). In the aspx page am simply adding a file using an addheader method and using response.write am writing an XML string to that file. Like ...
Response.AddHeader("Content-disposition", "attachment; filename=" + FileName + ".xml");
Response.ContentType = "application/xml";
Response.Write(FileContent);


The problem is something like when am clicking the button in the main page the dialog window asking whether to Open, Save or Cancel is popping out, if am giving Open then the particular Xml file is been opened in the same page. I do want to open this particular Xml file in another blank window. Is this possible? If possible how can I do that?

Thanks in Advance.

Is This A Good Question/Topic? 0
  • +

Replies To: Content Header Problem?

#2 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Content Header Problem?

Posted 11 March 2007 - 11:58 PM

There are a couple of ways you can do that. You can pass the information using a Query String to a new page to be rendered.
http://www.codeproje...QueryString.asp


You can use Response.Redirect to open a new page.
http://support.microsoft.com/kb/312063

How to pass data between ASP.NET pages.
Was This Post Helpful? 0
  • +
  • -

#3 venkatzeus  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 08-March 07

Re: Content Header Problem?

Posted 12 March 2007 - 05:13 AM

Thank You very Much.

I am able to get the xml page in a new window. Actually when you click the master page's button that time itself the pop window is popping up.. When that page is been loaded since in that page header we are appending the content the download window is popping out. At that time if am canceling or even if am saving the content the opener pop window is still there. I want to kill that window in case of cancel or save.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1