Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/09/2010, 13:39
Avatar de jaullo
jaullo
 
Fecha de Ingreso: abril-2009
Mensajes: 994
Antigüedad: 15 años, 6 meses
Puntos: 30
Respuesta: Server Control

Algo así seria

VB.NET

Código ASP:
Ver original
  1. <Assembly: WebResource("WhoIsLooking.WhoIsLooking.css", "text/css")>
C#

Código ASP:
Ver original
  1. [Assembly: WebResource("WhoIsLooking.WhoIsLooking.css", "text/css")]

Finally, the WhoIsLooking control includes the following lines of code in its OnPreRender() method:

VB.NET

Código ASP:
Ver original
  1. ' Add style sheet to parent page
  2.  
  3. Dim cssUrl As String = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "WhoIsLooking.WhoIsLooking.css")
  4.  
  5. Dim cssLink As New HtmlLink()
  6.  
  7. cssLink.Href = cssUrl
  8.  
  9. cssLink.Attributes.Add("rel", "stylesheet")
  10.  
  11. cssLink.Attributes.Add("type", "text/css")
  12.  
  13. Page.Header.Controls.Add(cssLink)
  14.  
  15. ' Add class name
  16.  
  17. Me.CssClass = "WhoIsLooking"

C#

// Add style sheet to parent page

Código ASP:
Ver original
  1. string cssUrl = Page.ClientScript.GetWebResourceUrl(this.GetType(),
  2.  
  3. "WhoIsLooking.WhoIsLooking.css");
  4.  
  5. HtmlLink cssLink = new HtmlLink();
  6.  
  7. cssLink.Href = cssUrl;
  8.  
  9. cssLink.Attributes.Add("rel", "stylesheet");
  10.  
  11. cssLink.Attributes.Add("type", "text/css");
  12.  
  13. this.Page.Header.Controls.Add(cssLink);
  14.  
  15. // Add class name
  16.  
  17. this.CssClass = "WhoIsLooking";
__________________
http://geekswithblogs.net/jaullo/Default.aspx
Si te he ayudado regalame Karma positivo!!!