Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Old ASP.NET webform has some inline code getting encoded :(

I've got a ASP.NET webforms site with some inline code on a master page ..

<meta property="og:title" content="<%=HeadTitle %>"/>

but it's rendering that line as..

<meta property="og:title" content="&lt;%=HeadTitle %>" />

In the codebehind, i have the following ...

protected string HeadTitle { get; set; }

Can anyone help?

like image 595
Pure.Krome Avatar asked Aug 01 '26 22:08

Pure.Krome


1 Answers

Remove the runat="server" attribute from the <head> tag in the master page.

like image 120
Darin Dimitrov Avatar answered Aug 03 '26 10:08

Darin Dimitrov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!