how to extend the base functionality of standard web controls - by Venugopal Mallarapu

原创 2004年08月23日 15:50:00

Option Strict On

Imports System.ComponentModel
Imports System.Web.UI

<DEFAULTPROPERTY("Text"), VALIDATIONPROPERTY("Text"),
    TOOLBOXDATA("<{0}:VenusDateTextBox runat=server>")>
 Public Class VenusDateTextBox _
    Inherits System.Web.UI.WebControls.TextBox _
    Implements INamingContainer

#Region " Member Variables "

    Private Const DateIncludeScriptKey As String = "DateCurrentDateInsertScript"

    ' The script block that is rendered to insert the Private I Date.
    Private Const DateCurrentDateInsertScript As String = ControlChars.CrLf & _
    "<SCRIPT LANGUAGE=""JAVASCRIPT"">" & ControlChars.CrLf & _
    "<!--" & ControlChars.CrLf & _
    "function InsertCurrentDate(VenusDateControl)" & ControlChars.CrLf & _
    "   {" & ControlChars.CrLf & _
    "        var curDate = new Date();" & ControlChars.CrLf & _
    "        var formattedDate = curDate.getMonth() + '/'" & _
    " + curDate.getDate() + '/' + curDate.getFullYear();" _
    & ControlChars.CrLf & _
    "        document.all.item(VenusDateControl).value = formattedDate;" _
    & ControlChars.CrLf & _
    "    }" & ControlChars.CrLf & _
    "// -->" & ControlChars.CrLf & _
    "</SCRIPT>"

#End Region

#Region " Overrides "

    Protected Overrides Sub AddAttributesToRender(ByVal_
                 writer As System.Web.UI.HtmlTextWriter)
        MyBase.AddAttributesToRender(writer)
        writer.AddAttribute("ondblclick", _
           "InsertCurrentDate('" & ClientID & "');")
    End Sub

    Protected Overrides Sub OnPreRender(ByVal e As System.EventArgs)
        MyBase.OnPreRender(e)
        RegisterVenusDateIncludeScript()
    End Sub

#End Region

#Region " Private Methods "

    Private Sub RegisterVenusDateIncludeScript()
        Dim location As String = Nothing
        If Not Page.IsClientScriptBlockRegistered(DateIncludeScriptKey) Then
            ' Create the client script block.
            Page.RegisterClientScriptBlock(DateIncludeScriptKey,_
                                DateCurrentDateInsertScript)
        End If
    End Sub

#End Region

End Class

Gradle project sync failed.Base functionality will not work property.

首次接触android,搭建开发环境,却出现这样的错误: 百度后,尝试了如下解决方法: 1、同步 2、下载高版本gradle,setting中手动关联 3、重新下载SDK ...
  • wangdaohaia
  • wangdaohaia
  • 2016-03-19 21:22:13
  • 411

Basic XLib functionality test failed! 解决方法

在做QT在虚拟机fedora上的安装的时候   做的这一步的时候出现错误 此完整出错信息是在./configure阶段 Basic XLib functionality test f...
  • innerpease
  • innerpease
  • 2012-05-28 15:58:05
  • 6445

what is "LSB " Linux Standard Base介绍

什么是LSB     LSB,即Linux标准规范(英语:Linux Standard Base)是一个在Linux基金会结构下对Linux发行版的联合项目,使Linux操作系统符合软件系统架构...
  • ladofwind
  • ladofwind
  • 2014-07-14 15:49:09
  • 2524

pare xml file by using QXmlStreamReader class

  • 2008年10月30日 09:50
  • 30KB
  • 下载

由java的extend的优劣引发的讨论技巧

最近项目需要搭建一套基于springcloud的框架,在项目讨论会上。有同事说到做了一些basebean,basecontroller,baseservice,basedao等一些基础类。要求相关类都...
  • karkaw
  • karkaw
  • 2017-12-04 11:13:26
  • 79

the functionality of an "nbtstat -A" code

 /* Blood and Sweat code * - Juggler of ChAoS - * Demonstrates use of an undocumented IOCTL call to ...
  • iiprogram
  • iiprogram
  • 2007-09-13 23:43:00
  • 798

UPF (Unified Power Format) Standard v1.0

  • 2009年11月26日 14:47
  • 571KB
  • 下载

Basic XLib functionality test failed! QT移植错误的解决

编译环境:fedora9.0  交叉编译器:4.3.2  今天在做QT的移植的时候在 #tar zxvf qt-x11-opensource-src-4.5.3.tar.gz   ...
  • zhaole20094463
  • zhaole20094463
  • 2012-02-12 16:56:09
  • 5804

How to Enable SAP BW Web functionality after a new BW installation

  • 2008年03月03日 11:27
  • 301KB
  • 下载

Linux Standard Base Core Specification 4.0

  • 2012年11月22日 20:17
  • 15.68MB
  • 下载
收藏助手
不良信息举报
您举报文章:how to extend the base functionality of standard web controls - by Venugopal Mallarapu
举报原因:
原因补充:

(最多只允许输入30个字)