sábado, 20 de marzo de 2010

Asp.Net: Recuperar elementos del HEAD.


Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
Dim ctl As Control
For Each ctl In Page.Header.Controls

If TypeOf (ctl) Is HtmlLink Then
Dim linkTag As HtmlLink = CType(ctl, HtmlLink)
If (linkTag IsNot Nothing) And linkTag.Href.StartsWith("~/") Then
If Request.ApplicationPath = "/" Then
linkTag.Href = linkTag.Href.Substring(1)
Else
linkTag.Href = Request.ApplicationPath & "/" & _
linkTag.Href.Substring("~/".Length)
End If
End If
End If
Next
End Sub


Referencia:

www.mindfly.com

No hay comentarios: