Content Type

Discussion in 'ASP .Net' started by hunt n peck, Aug 13, 2003.

  1. hunt n peck

    hunt n peck Guest

    is there a manual way code the "ContentType" header property?

    if i build an HTML page with <meta name="Content-Type"
    content="application/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?
    hunt n peck, Aug 13, 2003
    #1
    1. Advertising

  2. The Response.ContentType 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
    http://www.takempis.com
    Neither a follower nor a lender be.

    "hunt n peck" <x> wrote in message
    news:e3M$...
    > is there a manual way code the "ContentType" header property?
    >
    > if i build an HTML page with <meta name="Content-Type"
    > content="application/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, Aug 13, 2003
    #2
    1. Advertising

  3. hunt n peck

    hunt n peck Guest

    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" <> wrote in message
    news:...
    > The Response.ContentType 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
    > http://www.takempis.com
    > Neither a follower nor a lender be.
    >
    > "hunt n peck" <x> wrote in message
    > news:e3M$...
    > > is there a manual way code the "ContentType" header property?
    > >
    > > if i build an HTML page with <meta name="Content-Type"
    > > content="application/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?
    > >
    > >
    > >

    >
    >
    hunt n peck, Aug 13, 2003
    #3
  4. 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
    http://www.takempis.com
    Neither a follower nor a lender be.

    "hunt n peck" <x> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    > > The Response.ContentType 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
    > > http://www.takempis.com
    > > Neither a follower nor a lender be.
    > >
    > > "hunt n peck" <x> wrote in message
    > > news:e3M$...
    > > > is there a manual way code the "ContentType" header property?
    > > >
    > > > if i build an HTML page with <meta name="Content-Type"
    > > > content="application/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, Aug 13, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TheKeith
    Replies:
    20
    Views:
    106,287
    Chris Morris
    Oct 29, 2003
  2. hazz
    Replies:
    6
    Views:
    49,386
    SkyUCHC
    Jun 9, 2010
  3. Stanimir Stamenkov
    Replies:
    2
    Views:
    733
    Stanimir Stamenkov
    Oct 25, 2005
  4. heyo
    Replies:
    3
    Views:
    884
    Dan Pop
    Apr 1, 2004
  5. Lampa Dario
    Replies:
    3
    Views:
    440
    Old Wolf
    Sep 10, 2005
Loading...

Share This Page