简体   繁体   English

访问<script> tag from codebehind

[英]Access <script> tag from codebehind

I was trying to access < script type='text/javascript' ....>< / script > existing within Head tag. 我试图访问Head标签中存在的<script type ='text / javascript'....> </ script>。

What I was doing to achieve that, 我在做什么来实现这一目标,

    foreach (Control ctrl in Header.Controls)
    {          
            Response.Write(ctrl.GetType() + "<br/>");
    }

It gives me the reference of "title", "meta" and "literal" control. 它给了我“标题”,“元”和“文字”控制的参考。 How can I get the control and get the "src" attribute of that tag. 如何获取控件并获取该标签的“src”属性。

你的<script>标签是否有runat="server"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM