Content Type

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hunt n peck

    #1

    Content Type

    is there a manual way code the "ContentTyp e" header property?

    if i build an HTML page with <meta name="Content-Type"
    content="applic ation/vnd.ms-excel"> in the header the browser just loads
    the contents as a web page.

    I dont want to use the response object's ContentType property.

    Cant it be dont manually in HTML?

    what HTML does the ContentType property actually generate?



  • Kevin Spencer

    #2
    Re: Content Type

    The Response.Conten tType property doesn't set any HTML. It sets a Response
    Header. Not all Response Headers that are included in a Response are visible
    in the page HTML. Many of them are there for the browser, and the browser
    simply reads them.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    All hotels in Benidorm. The best selection of Benidorm hotels with reviews and maps. Book in advance and save.

    Neither a follower nor a lender be.

    "hunt n peck" <x> wrote in message
    news:e3M$AXaYDH A.2020@TK2MSFTN GP10.phx.gbl...[color=blue]
    > is there a manual way code the "ContentTyp e" header property?
    >
    > if i build an HTML page with <meta name="Content-Type"
    > content="applic ation/vnd.ms-excel"> in the header the browser just loads
    > the contents as a web page.
    >
    > I dont want to use the response object's ContentType property.
    >
    > Cant it be dont manually in HTML?
    >
    > what HTML does the ContentType property actually generate?
    >
    >
    >[/color]


    Comment

    • hunt n peck

      #3
      Re: Content Type

      Thanks.
      Can I use an asp page to send both an html page AND a downloadable file to
      the client all in one response?
      Would I use HTTP headers to do that?




      "Kevin Spencer" <kevin@takempis .com> wrote in message
      news:eGzoimaYDH A.1004@TK2MSFTN GP12.phx.gbl...[color=blue]
      > The Response.Conten tType property doesn't set any HTML. It sets a Response
      > Header. Not all Response Headers that are included in a Response are[/color]
      visible[color=blue]
      > in the page HTML. Many of them are there for the browser, and the browser
      > simply reads them.
      >
      > --
      > HTH,
      >
      > Kevin Spencer
      > Microsoft MVP
      > .Net Developer
      > http://www.takempis.com
      > Neither a follower nor a lender be.
      >
      > "hunt n peck" <x> wrote in message
      > news:e3M$AXaYDH A.2020@TK2MSFTN GP10.phx.gbl...[color=green]
      > > is there a manual way code the "ContentTyp e" header property?
      > >
      > > if i build an HTML page with <meta name="Content-Type"
      > > content="applic ation/vnd.ms-excel"> in the header the browser just[/color][/color]
      loads[color=blue][color=green]
      > > the contents as a web page.
      > >
      > > I dont want to use the response object's ContentType property.
      > >
      > > Cant it be dont manually in HTML?
      > >
      > > what HTML does the ContentType property actually generate?
      > >
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Kevin Spencer

        #4
        Re: Content Type

        I don't know the answer to that one. Never came across such a situation
        before. Seems it might be possible with an attachment of some kind.

        --
        HTH,

        Kevin Spencer
        Microsoft MVP
        ..Net Developer
        All hotels in Benidorm. The best selection of Benidorm hotels with reviews and maps. Book in advance and save.

        Neither a follower nor a lender be.

        "hunt n peck" <x> wrote in message
        news:e17pXEcYDH A.1056@TK2MSFTN GP10.phx.gbl...[color=blue]
        > Thanks.
        > Can I use an asp page to send both an html page AND a downloadable file to
        > the client all in one response?
        > Would I use HTTP headers to do that?
        >
        >
        >
        >
        > "Kevin Spencer" <kevin@takempis .com> wrote in message
        > news:eGzoimaYDH A.1004@TK2MSFTN GP12.phx.gbl...[color=green]
        > > The Response.Conten tType property doesn't set any HTML. It sets a[/color][/color]
        Response[color=blue][color=green]
        > > Header. Not all Response Headers that are included in a Response are[/color]
        > visible[color=green]
        > > in the page HTML. Many of them are there for the browser, and the[/color][/color]
        browser[color=blue][color=green]
        > > simply reads them.
        > >
        > > --
        > > HTH,
        > >
        > > Kevin Spencer
        > > Microsoft MVP
        > > .Net Developer
        > > http://www.takempis.com
        > > Neither a follower nor a lender be.
        > >
        > > "hunt n peck" <x> wrote in message
        > > news:e3M$AXaYDH A.2020@TK2MSFTN GP10.phx.gbl...[color=darkred]
        > > > is there a manual way code the "ContentTyp e" header property?
        > > >
        > > > if i build an HTML page with <meta name="Content-Type"
        > > > content="applic ation/vnd.ms-excel"> in the header the browser just[/color][/color]
        > loads[color=green][color=darkred]
        > > > the contents as a web page.
        > > >
        > > > I dont want to use the response object's ContentType property.
        > > >
        > > > Cant it be dont manually in HTML?
        > > >
        > > > what HTML does the ContentType property actually generate?
        > > >
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...