|
Guys;
I am developing a control that should contain html elements
like
<web:CommandLink ID="cmdDelete" runat="Server" >
<img alt="Delete" src="images/delete.jpg" />
</web:CommandLink>
I started with implementing IParserAccessor .
Am I in the right direction ?
Thank you.
Help people,so poeple can help you.
modified 24-Dec-12 5:29am.
|
|
|
|
|
So your trying to make a server or user control?
|
|
|
|
|
A server one.
the new thing is I implemented IParserAccessor.AddParsedSubObject this way
Public Sub AddParsedSubObject(ByVal obj As Object) Implements System.Web.UI.IParserAccessor.AddParsedSubObject
If (TypeOf (obj) Is LiteralControl) Then
Me._templateText = CType(obj, LiteralControl).Text
Else
Throw New Exception("Not supported")
End If
End Sub
it works fine but it gives me the validation error 'img cannot be nested with commandlink'.
what should I do to avoid that?
Help people,so poeple can help you.
|
|
|
|