Skip to content

Instantly share code, notes, and snippets.

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)
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Text
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
<DefaultProperty("Text"), ToolboxData("<{0}:myBtn runat=server></{0}:myBtn>")> _
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Text
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
<DefaultProperty("Text"), ToolboxData("<{0}:myBtn runat=server></{0}:myBtn>")> _
'Anders Åberg
'LinkButton med ikon & text
'Används:
'<cc1:myBtn ID="addTask" runat="server" Text="Lägg till uppgift" ImageUrl="Images/add.png" ></cc1:myBtn>
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Text
Imports System.Web
Imports System
Imports System.Web
Imports System.Web.Mvc
Imports System.IO
Imports System.Xml
Imports System.Text
Imports System.Collections.Generic
Imports System.Web.Script.Serialization
Imports System.Runtime.Serialization
Imports System.Reflection
Imports System
Imports System.Web
Imports System.Web.Mvc
Imports System.IO
Imports System.Xml
Imports System.Text
Imports System.Collections.Generic
Imports System.Web.Script.Serialization
Imports System.Runtime.Serialization
Imports System.Reflection
<system.webServer>
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
<dynamicTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/javascript" enabled="true" />
<add mimeType="*/*" enabled="false" />
</dynamicTypes>
<staticTypes>
@abergs
abergs / Generics Example
Last active February 13, 2018 21:45
Typescript Generics Example (http://ideasof.andersaberg.com/)
class MyApp {
constructor() {
var myUsers = new CustomCollection<User>();
var myMessages = new CustomCollection<Message>();
myUsers.Add(new User());
myMessages.Add(new Message());
var user: User = myUsers.GetFirst();
@abergs
abergs / Generic observable
Last active December 18, 2015 17:19
Generic observable example (http://ideasof.andersaberg.com/)
/// <reference path="ko.d.ts" />
class MyKnockOutApp {
User: KnockoutObservable<User>;
PrivateMessage = ko.observable<Message>(null);
MyComputedMessage: KnockoutComputed<Message>;
constructor() {
// Will throw an error since types are not matching
this.User = ko.observable<Message>(undefined);
Alla
Malmö
Stockholm
Göteborg
Lund
Karlstad
Helsingborg
Uppsala
Västerås
Linköping