Custom control code for moving motion in ASP.NET

zhaozj2021-02-16  73

Imports System.comPonentmodelimports System.Web.uiimports System.Web.ui.WebControlsimports System.Web

Public Class WebcustomControl1: Inherits Control: IMPLEments inamingcontainer

Protected Overrides Sub CreateChildControls () DIM TABLE1 AS New Table DIM SRC AS STRING SRC = "C: /11.jpg" DIM X AS STRING DIM S AS INTEGER S = 200 'According to the value of S, the distance is determined to the left

Me.Controls.add (table1) table1.attributes.add ("Background", SRC) Table1.attributes.add ("width", "1000")

DIM ROW1 AS NEW TABLEROW TABLE1.ROWS.ADD (ROW1) DIM CELL1 AS NEW TABLECELL ROW1.CELLS.ADD (CELL1) DIM IMG AS NEW Image Cell1.controls.add (img) img.imageURL = "http: // www. 9cbs.net/images/9cbs.gif "'img.style =" Position: Relative; Left: 100; "x =" Position: Relative; Left: "& S &"; IMG.ATRIBUTES.ADD ("style" , X)

End Subend Class

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

New Post(0)