My firstControl

xiaoxiao2021-03-06  14

With CSC / T: library /out:xx.dll xx.cs, you can generate a DLL next to you can add a reference to it in VS.NET. Source code from 9cbs: use system; using system.web.ui.webControls;

namespace CustomControls {public class FirstControl: Control {private String message = "Hello"; public virtual String Message {get {return message;} set {message = value;}} protected override void Render (HtmlTextWriter writer) {writer.Write ( " this.Message "
" "The time on the server is" system.datetime.now.tolongTimeString () "");}}}

转载请注明原文地址:https://www.9cbs.com/read-67591.html

New Post(0)