Created
September 2, 2010 09:07
-
-
Save abergs/562078 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Function createBtn(ByVal Handler As EventHandler, Optional ByVal text As String = "Ändra", Optional ByVal link As String = "main.aspx") | |
Dim editbtn As New LinkButton | |
editbtn.Attributes.Add("rel", link) | |
editbtn.Attributes.Add("class", "Btn") | |
editbtn.Attributes.CssStyle.Add("margin-left", "10px") | |
editbtn.ID = "editBtn" | |
Dim icon As New Image | |
icon.ImageUrl = "Images/edit.png" | |
icon.CssClass = "icon" | |
editbtn.Controls.Add(icon) | |
Dim Btntext As New HtmlGenericControl("span") | |
Btntext.InnerText = text | |
Btntext.ID = "text" | |
editbtn.Controls.Add(Btntext) | |
AddHandler editbtn.Click, Handler | |
Return editbtn | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment