Tech Off Post

Single Post Permalink

View Thread: Content Header??
  • User profile image

    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";

    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.