Programming 笔记

工作中遇到的问题就记载这里

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
Method 1.
<%@ Control Language="vb" AutoEventWireup="false" Codebehind="LoginControl.ascx.vb" Inherits="MCADPrac.LoginControl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> <%@ Control Language="vb" AutoEventWireup="false" Codebehind="LoginControl.ascx.vb" Inherits="MCADPrac.LoginControl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> <%@ Control Language="vb" AutoEventWireup="false" Codebehind="LoginControl.ascx.vb" Inherits="MCADPrac.LoginControl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> <%@ Control Language="vb" AutoEventWireup="false" Codebehind="LoginControl.ascx.vb" Inherits="MCADPrac.LoginControl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> <%@ Control Language="vb" AutoEventWireup="false" Codebehind="LoginControl.ascx.vb" Inherits="MCADPrac.LoginControl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<style>
 BODY { MARGIN: 0px }
 .LoginControl { BORDER: 1px solid  <% response.write( sBorderColor)%> ;}
 .LoginControl TABLE { BORDER-TOP-WIDTH: 2px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: 100%; BORDER-RIGHT-WIDTH: 0px }
 .LoginControl .Text { FONT-SIZE: x-small; COLOR: green; FONT-FAMILY: verdana, arial, helvetica }
</style>


sBorderColor is variable in vb code.

Imports System.web.UI.WebControls

Imports System.Web.UI.HtmlControls

Public Class LoginControl

    Inherits System.Web.UI.UserControl

    Private sUserName As String

    Public sBorderColor As String

Method 2.

Simple property (syntax for a customer):
<%# custID %>
            
Collection (syntax for an order):
<asp:ListBox id="List1" datasource='<%# myArray %>' runat="server">
            
Expression (syntax for a contact):
<%# ( customer.First Name + " " + customer.LastName ) %>
            
Method result (syntax for the outstanding balance):
<%# GetBalance(custID) %>

posted on 2006-04-20 11:44  IT 笔记  阅读(164)  评论(0编辑  收藏  举报