Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET inline coding: variable name is not replaced with value
    primarykey
    data
    text
    <p>I have an ASP.NET page .In the page load i set the value of a public variable.and in the inline coding part,I Am loading a CSS which is the folder with the name which is available in the public variable.My HTML markup is as follows</p> <pre><code>&lt;%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Theme="GridView" Inherits="GUI.MyPage" %&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;title&gt;MyPage&lt;/title&gt; &lt;link href="../Vendors/&lt;%=vendorName%&gt;/css/style.css" rel="stylesheet" type="text/css" /&gt; &lt;/head&gt; &lt;body&gt; &lt;%=vendorName %&gt; &lt;!-- here value is printed correctly --&gt; ... &lt;/body&gt; </code></pre> <p>and in my code behind</p> <pre><code> public partial class MyPage: MyCommonClass { public string vendorName = ""; protected void Page_Load(object sender, EventArgs e) { vendorName = "ACLL"; } } </code></pre> <p>But when i run the page, the &lt;%=VEndorId%> is not replaced with the value in it .But in the Body,It is printing properly.But in the head it is not coming.I checked the ViewSource and find the source HTML as follows</p> <pre><code>&lt;link href="../Vendors/&amp;lt;%=vendorName%&gt;/Lib/css/tradein.css" rel="stylesheet" type="text/css" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload