| Join | Help
in

Strong Coders Community

Where the extreme coders hang out.

content header??

Last post 03-13-2007 11:17 AM by JamesCurran . 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-12-2007 12:20 AM
    • hannibal
    • Top 10 Contributor
    • Joined on 12-14-2006
    • Posts 14
    • Points 235

    content header??

    Reply Contact
    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.
    • Post Points: 50
  • 03-12-2007 11:58 PM In reply to
    • manishbafna
    • Top 10 Contributor
      Male
    • Joined on 10-18-2006
    • India
    • Posts 60
    • Points 1,000

    Re: content header??

    Reply Contact

    End user can always check off the option "Always ask before opening this type of file" that is shown in the dialog box,from the next time the user will not able to see the dialogbox.You can let end user know of this by providing this message in the tool tip of the Button.Also you can set isballon property of tooltip to be true so that end users get notice of it.

    Hope this helps you out.

    Thanks and regards,

    Manish Bafna.

    MCP and MCTS.

    • Post Points: 5
  • 03-13-2007 12:03 AM In reply to
    • manishbafna
    • Top 10 Contributor
      Male
    • Joined on 10-18-2006
    • India
    • Posts 60
    • Points 1,000

    Re: content header??

    Reply Contact

     Kindly ignore my previous mail as i misunderstood your question.

    This link resolves your problem/Query

    http://forums.asp.net/thread/1177421.aspx

    Thanks and Regards,

    Manish Bafna

    • Post Points: 5
  • 03-13-2007 11:17 AM In reply to
    • JamesCurran
    • Top 10 Contributor
      Male
    • Joined on 11-01-2006
    • Bloomfield, NJ, USA
    • Posts 95
    • Points 1,255
    • StrongCoders

    Re: content header??

    Reply Contact

    I believe you want:

    Response.ContentType = " text /xml";

    Truth,
    James
    • Post Points: 5
Page 1 of 1 (4 items)

Copyright © 2006-2007 Strong Coders Community. All rights reserved.
Privacy Statement | Terms Of Use | Advertise with us | Site Feedback

Powered by Community Server (Commercial Edition), by Telligent Systems