I have user control Functions with this function:
Function createUrl(ByVal link As String, ByVal name As String, Optional
ByVal stev As Int16 = 0, Optional ByVal cl As Int16 = 0) As String
Dim clas As String
If stev = 0 Then
clas = ""
End If
If cl = 0 Then
createUrl = "<table border=1><tr><td><a href='" & link & "'>" &
name & "</a></td></tr></table>"
End If
End Function
Then I have page default.aspx where I register this control.
If this was asp I can do like this:
<%=createUrl("test.aspx",test)%>
<%=createUrl("test1.aspx",test1)%>
How can I do the same with asp.net?
I create 2 labels on page and on codebehind page I can use the control like
this:
Public functions As functions = New functions
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Here I can use this control like this:
label1.text= functions.createUrl("test.asp", "test")
label2.text= functions.createUrl("test.asp", "test")
End Sub
But If I do like this, label.text doesn't know the <table border='1'>
Is there some kind of server control like <asp:span> or <asp:div> where you
can add table and similar objects on codebehind page?
Thank you,
Simon