Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8483763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:11:43+00:00 2026-06-10T20:11:43+00:00

I have a page that I use to pull a file from the database

  • 0

I have a page that I use to pull a file from the database and either prompt for download or stream to the browser depending on how the URL is formatted. This is working fine, however nothing I do will work when trying to set the page title and it defaults to the domain name in the URL.

I realize this is most likely happening because I am sending a binary file to the browser using Response.OutputStream.Write(buffer, 0, bytesRead) and so according to something else I found online “I am filling up the buffer with the binary file so I have no control over the title”

You are filling up the buffer with a binary file, with no HTML and hence no Title Tag. I am not sure you have any control over the Title tag in the browser at this point. Let me check on a page I have up right now with a PDF. It does not look like this can be done, at least in the example I am looking at. I had another PDF opened, but it was to a local file directly and it had the Title tag set in the browser. I am not sure if this was embedded in the PDF or not.

Found here: http://forums.asp.net/t/1088814.aspx/1

I have tried all the normal places to set the page title:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="FileServer.aspx.vb" Inherits="FileServer" Title="Title goes here" %>

or

<head runat="server">
    <title>Title goes here</title>
</head>

or

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim FileNumber As String = RouteData.Values("FileNumber")
        Dim Disposition As String = RouteData.Values("Disposition")

        If FileNumber IsNot Nothing Then
            Title = "Title goes here"
            ServeFile(FileNumber, Disposition)
        End If
End Sub

Is there any way for me to set this title or am I out of luck?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:11:45+00:00Added an answer on June 10, 2026 at 8:11 pm

    You cannot set the title while at the same time sending a file down to the browser. For the browser to change the “page” title, it needs to actually render an HTML document (ie. it needs to render a page).

    In this situation you’re not sending any valid HTML content, hence the fact that the contents you are sending are downloaded.

    If you want to do this, what you will need to do is do a sort of “bounce”. Redirect to a page that renders out the title, and any other content that you want (ie. an aspx page). And from that page “bounce” the browser over to the download.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page layout that I use in my SharePoint solution when I
I have a web page that I use to update a fairly complex data
I have a page with some very basic examples that use HTML/CSS/JavaScript. I'd like
I have a page that requires jQuery.tmpl, but I want to use native knockout
I use ADO.NET Entity-Framework, I have a page that is data-bound to an entity
I have a webforms page that makes quite extensive use of AJAX. There are
I have a timed page that I need to use to submit a form
I have links on a ,page that I want to use to jump to
I have a form on a page that a user can use to create
I have a simple django page that has a counter on it. I use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.