Hiii
i am working on e-commorce website. i wan't to change page title dynamically with the help of data base according to the product in asp.net. please give me some answer
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Aditya MishraRank #3,676 · 400 reputationPosted Jun 1, 2015, 3:15 AM EDT
Manoj BhoirRank #599 · 4K reputationPosted Jun 1, 2015, 1:51 AM EDT
protected void Page_Load(object sender, EventArgs e) { if (string.IsNullOrEmpty(Page.Title)) { Page.Title = GetPageTitle(); } } private string GetPageTitle() { // Code to retrieve Page title from database.Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Jun 1, 2015, 1:58 AM EDT
Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Jun 1, 2015, 2:26 AM EDT
{
string str;
str = "Put Your Query";
SqlCommand com = new SqlCommand(str, Con_Name);
object obj = com.ExecuteScalar();
Page.Title = obj.ToString();
}