ASP.Net Meta Tags: Programmatically populate Title, Keywords and Description in Page Head Section from database
ASP.Net Meta Tags: Programmatically populate Title, Keywords and Description in Page Head Section from database I'm trying to create search option in my ASP.net application to check Doctor details based on Location. If I try the below code, only home page is showing. http://example.com/Metatag/Home.aspx . I want the URL to be changed as per location. Example expected URL: http://example.com/Metatag/chennai/doctors/saidapet http://example.com/Metatag/Home.aspx http://example.com/Metatag/chennai/doctors/saidapet I'm new to this technology. Page Load protected void Page_Load(object sender, EventArgs e) { string page = Request.Url.Segments[Request.Url.Segments.Length - 1]; string location = Request.Url.Segments[Request.Url.Segments.Length - 1]; DataTable dtMeta = this.GetData(page,location); //Add Page Title this.Page.Title = dtMeta.Rows[0]["Title"].ToString(); //Add Keywords Meta Tag HtmlMeta keywords = new HtmlMeta(); keywords.Ht...