G
Guest
Is it possible to use the <% %> tag to embed a variable from page_load into a
meta tag in the aspx source? Somehow I am not getting the value out of my
variable properly - probably not using quotes correctly or something simple,
but after a full day of trying every possible syntax under the sun, I hope
someone can help.
Page_Load:
this.myKeywords = "keyWordOne keyWordTwo keyWordThree";
aspx source:
<head runat="server">
<meta name="keyword" content="<%=myKeywords %>" id="metaKeyword"
runat="server" />
</head>
results (source at runtime):
<meta id="metaKeyword" name="keyword" content="<%=myKeywords %>" />
note, my problem is that the results should be the value in myKeywords, not
="<%=myKeywords %>" as shown above.
meta tag in the aspx source? Somehow I am not getting the value out of my
variable properly - probably not using quotes correctly or something simple,
but after a full day of trying every possible syntax under the sun, I hope
someone can help.
Page_Load:
this.myKeywords = "keyWordOne keyWordTwo keyWordThree";
aspx source:
<head runat="server">
<meta name="keyword" content="<%=myKeywords %>" id="metaKeyword"
runat="server" />
</head>
results (source at runtime):
<meta id="metaKeyword" name="keyword" content="<%=myKeywords %>" />
note, my problem is that the results should be the value in myKeywords, not
="<%=myKeywords %>" as shown above.