It all depends on which technologies you've used, how you made your template and what code is handling the rendering of the actual product.
Lets say that your template is a MasterPage, then you would use the code i posted. And lets say that your handling the product in a UserControl, then you would set the title just by calling
Lets say that your template is a MasterPage, then you would use the code i posted. And lets say that your handling the product in a UserControl, then you would set the title just by calling
Page.Title = myProduct.Name;
You could also be using Razor all the way, then you have something like ViewBag.Title you can set and read, or you can sometimes return a head-tag from the function that handles the product, which then would set the title, but it again depends on which type of template you have whether its supported or not.<html>
<head>
<title>Title of your product</title>
</head>
<body> body-content of the product that should be rendered on the page </body>
</html>
So there there is no one-and-only way to do it, but it depends on what underlying technologies and methods you're using.