strOutput = sw.ToString
'remove the dummy namespace attribute
If Not strOutput = "" Then
' strOutput = strOutput.Replace("xmlns:asp=""remove""", "")
strOutput = strOutput.Replace("xmlns:sec=""remove""", "")
End If
oCtl = Page.ParseControl(strOutput)
phdExtraInfo.Controls.Clear()
phdExtraInfo.Controls.Add(oCtl)
Finally
End Try
Subject:ASP.NET XSL custom control Author:Aiman Ashraf Date:16 Sep 2005 07:28 AM
Hi,
Well, the remove xmlns:sec is done from the output string of the XSL transform method (which is html)...so that's not a problem....
Anyway, I found the solution. Though this is related more to .NET than XSL but anyway here goes:
We just have to prepend the following string to the output of the transform method:
Dim result As String = "<%@ Register TagPrefix=""sec"" Namespace=""MyNamespace"" Assembly=""MyAssembly"" %>"
Basically, this tells the page where to find the tag and the corresponding control.