I'm very new to .NET and unfortunately having to take over an ex-colleague's project.
Part of my code has a while loop to loop out query results...
while (reader.Read())
{
pageTitle.Text = reader["title"].ToString();
}
I am currently using this to retrieve the Page Title from a Table in my Database.
I want to display this in my <title></title> of the SiteMaster file, but unfortunately right now using this method:
<title><asp:Label ID="pageTitle" runat="server" /></title> is giving me a span tag inside the <title>. I want to remove the altogether and just have the Title value.
Can anyone explain the best way to do this?
Appreciate your help and patience with this.
Thank you