ok, so I was able to figure out how to do it in ASP.NET C#.
In your myPage.aspx.cs file, set the very last line of function Page_Load() like so:
Code:
protected void Page_Load(object sender, System.EventArgs e)
{
<.....other existing code....>
//set page title
Page.Header.Title = "This will over-ride title from ASDNSF";
}
If anyone needs to do what I was doing (set the page title to that of one included in an iframe), there is an ASP.NET work around I found that works pretty well using Screen Scraping.
Note: this might only work for pages on the same domain, but I have not tried it with pulling a page from a different domain.
First, in your myPage.aspx.cs file, make the following changes:
Code:
using System;
using System.Web;
using System.Web.UI;
using AspDotNetStorefrontCore;
namespace AspDotNetStorefront
{
/// <summary>
/// Summary description for news.
/// </summary>
public partial class myPage : SkinBase
{
static string myTitle = "no title";
publlic static string myContent = "";
protected void Page_Load(object sender, System.EventArgs e)
{
<...other existing code...>
using (System.Net.WebClient client = new System.Net.WebClient())
{
//get page
myContent = client.DownloadString("http://www.somesite.com/anypage.php?q=" + Request.QueryString["q"]);
//find title
myTitle = myContent.Substring(myContent.IndexOf("<title>")+7);
myTitle = myTitle.Substring(0, myTitle.IndexOf("</title>"));
}
//set page title
Page.Header.Title = myTitle;
}
}
}
Then in myPage.aspx, replace your <iframe> tag with the following:
Code:
<% Response.Write(myContent); %>
Hope this helps someone in the future!