Dışardan script dosyası eklemek istersek
 
HtmlGenericControl Include = new HtmlGenericControl("script"); Include.Attributes.Add("type", "text/javascript");
Include.Attributes.Add("src", "/__utm.js");
Page.Header.Controls.Add(Include); 
Direk  kod yazmak istersek
 
HtmlGenericControl Include = new HtmlGenericControl("script"); Include.Attributes.Add("type", "text/javascript");
Include2.InnerHtml = "alert('We added it to the head');";
Page.Header.Controls.Add(Include);

Bu makale 492 kere okundu.

Share to Facebook Share to Twitter Share to MySpace Stumble It Share to Reddit Share to Delicious More...

 

   

asp-net-dinamik-olarak-heada-script-eklemek



Linkler



Son Yorumlar

  • Erhan

    tam aradığım konu ama eksik...

  • zuleyha

    burcumu nasil okuyabilirim ...

  • kerem bora

    Maili dün yazmıştım, bugün ...

Twitter