由dumbo muppets构建的ASP.NET [英] ASP.NET architected by dumbo muppets

查看:41
本文介绍了由dumbo muppets构建的ASP.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我所谈论的一个例子


asp.net采取的是一个非常简单,强大和灵活的

概念,http请求/响应与html进行演示


并将其变成一个荒谬的过于复杂的kludge

导致问题多于它通过尝试将b $ b变为平面,事件驱动来解决。范例


例如:


这里是一个html图片标签


< img src =" Image.gif" />


它有一些额外的属性,如高度,宽度,边框


现在看看相同元素的asp.net文档(如下)


它永远不会结束


如果你看看这些asp.net新闻组你实际上将会看到人们提出的问题,例如我如何设置src属性

的HtmlImage对象?与asp.net


然后是物业访问的长描述

和watch out; 不要在错误的时间做

确保你......


API意味着在那里包装复杂的代码和

使其易于处理


这是一个REVERSE API它需要一些简单的事情

an < IMG />标记并将其变成复杂的东西

这会浪费人们的时间和精力,无论如何都没有任何好处。


" DataBinding" - piffle - 愚蠢的陈述性,不灵活的垃圾

" UserControls" - 平坦无意义,不灵活地重新发明一个方法

带有一个代码块(它甚至不能回调到包含

页面而没有头痛)
" CustomControls" - 好极了!我们可以创造我们自己无意义的偏差 -

哦只是每个类只有一种渲染方法!

i明白在asp.net 2.0中微软已经认为我们值得付出

的母版页 - 哦,我的上帝 - 我一直这样做已经

自aspv1.0以来它被称为asp包含页面的代​​码块和

回调

这是为谁写的?


如果你不能查询数据库并写出一些html字符串

你有什么可以吗?

" viewstate" - 哦,是的,我真的需要帮助 - 不是!


C#很棒

..NET框架摇滚


ASP.NET发生了什么?

它可能真的很好

反而是一个糟糕的笑话强加于

美国专业人士的dumbo muppets

.NET Framework类库


HtmlImage MembersSee还

HtmlImage类| System.Web.UI.HtmlControls命名空间| Web命名空间
Visual Studio中的
用于C ++编程的托管扩展

HtmlImage概述

公共构造函数

HtmlImage构造函数初始化HtmlImage的新实例

class。


公共属性

Align获取或设置图像相对于其他Web的对齐
页面元素。

Alt获取或设置浏览器显示的替代标题,如果

图像不可用或当前正在下载但尚未完成。

属性(继承自HtmlControl)获取

.aspx文件中服务器控件标记上表示的所有

属性名称和值对的集合。

Border获取或设置图像框架的宽度。

ClientID(从Control继承)获取ASP.NET生成的服务器控件标识符



Controls(从Control继承)获取一个ControlCollection对象,

代表一个speci的子控件用户界面中的虚拟服务器控件

层次结构。

禁用(继承自HtmlControl)获取或设置一个值,表示

HTML服务器控件是否为已禁用。

EnableViewState(从Control继承)获取或设置一个值

,指示服务器控件是否持续其视图状态,以及

视图它包含的任何子控件的状态,请求客户端。


Height获取或设置图像的高度。

ID(从Control继承)获取或设置分配给服务器控件的程序标识符



NamingContainer(继承自Control)获取对服务器的引用

control'' s命名容器,它为

创建一个唯一的命名空间,区分具有相同Control.ID

属性值的服务器控件。

Page(继承来自Control)获取对包含服务器控件的Page实例

的引用ol。

Parent(从Control继承)获取对服务器的引用

控件在页面控件层次结构中的父控件。

站点(从Control继承)获取有关服务器控件所属的网站的信息



Src获取或设置要显示的图像文件的来源。 />
Style(继承自HtmlControl)获取应用于指定HTML服务器控件的所有级联

样式表(CSS)属性的集合

in。 aspx文件。

TagName(继承自HtmlControl)获取标签的元素名称

包含runat = server属性和值对。

TemplateSourceDirectory(从Control继承)获取包含当前服务器的页面或UserControl的虚拟

目录

控件。

UniqueID(继承)来自Control)获取服务器控件的唯一,

分层限定标识符。

可见(从Control继承)获取或设置一个值,该值指示

服务器控件是否在页面上呈现为UI。

Width获取或设置图像的宽度。


公共方法

DataBind(从Control继承)将数据源绑定到调用的

服务器控件及其所有子控件。

Dispose(继承自Control)使服务器控件在从内存中释放之前执行最终清理。

Equals(继承自Object)已重载。确定两个

对象实例是否相等。

FindControl(从Control继承)重载。搜索指定服务器控件的当前

命名容器。

GetHashCode(继承自Object)用作

特定类型的哈希函数,适用于哈希算法和数据

结构,如哈希表。

GetType(继承自Object)获取当前实例的Type。

HasControls(继承自Control)确定服务器控件

是否包含任何子控件。

RenderControl(从Control继承)输出服务器控件内容

到提供的HtmlTextWriter对象,如果启用了跟踪,则存储关于控件的跟踪信息



ResolveUrl(从Control继承)将URL转换为

可在请求客户端上使用。

ToString(继承自Object)返回表示

当前对象的String。


公共事件

DataBinding(继承自Contr ol)当服务器控件

绑定到数据源时发生。

Disposed(从Control继承)当服务器控件发布时发生
发布来自内存,这是服务器控件的最后一个阶段

请求ASP.NET页面时的生命周期。

Init(从Control继承)当服务器控件是

已初始化,这是其生命周期的第一步。

加载(继承自Control)在加载服务器控件时发生

into Page对象。

PreRender(继承自Control)当服务器控件即将渲染到其包含的Page对象时发生。

卸载(从Control继承)当服务器控件从内存中卸载时发生。


受保护的属性

ChildControlsCreated(继承自Control )获取一个值

表示服务器控件的子控件是否已经

creat ed。

Context(从Control继承)获取与当前Web请求的服务器控件关联的HttpContext对象



事件(继承来自Control)获取控件的事件处理程序委托列表

。此属性是只读的。

HasChildViewState(从Control继承)获取一个值,指示

当前服务器控件的子控件是否已保存

视图状态设置。

IsTrackingViewState(从Control继承)获取一个值

表示服务器控件是否正在保存对其视图的更改

state。

ViewState(继承自Control)获取状态字典

信息,允许您保存和恢复视图状态

跨同一页面的多个请求的服务器控制。

ViewStateIgnoresCase(从Control继承)获取一个值

指示StateBag对象是否不区分大小写。


受保护的方法

AddedControl(继承自Control)在控件添加后调用

到另一个控件的Controls集合。

AddParsedSubObject(从Control继承)通知服务器控件

解析了一个元素(XML或HTML),并将元素

添加到服务器控件的ControlCollection对象。

ClearChildViewState(继承自Control)删除所有服务器控件的子控件的视图状态

信息。

CreateChildControls(继承自Control)通知服务器控件

使用基于组合的实现来创建任何子控件

它们包含以准备回发或渲染。

CreateControlCollection(继承自Control )创建一个新的

ControlCollection对象来保存服务器控件的子控件(文字和

服务器)。

EnsureChildControls(继承自Control)确定

服务器控件是否包含子控件。如果没有,它会创建

子控件。

Finalize(继承自Object)重写。允许对象

尝试释放资源并执行其他清理操作

垃圾回收对象回收。

在C#和C ++中,终结符用析构函数语法表示。


IsLiteralContent(继承自Control)确定服务器

控件是否只保存文字内容。

LoadViewState(从Control继承)从SaveViewState

方法保存的上一页请求中恢复视图状态信息



MapPathSecure(从Control继承)检索物理路径

a虚拟路径,无论是绝对路径还是相对路径,映射到。

MemberwiseClone(继承自Object)创建一个浅层副本

当前对象。

OnBubbleEvent(继承自Control)确定服务器控件的事件是否传递给页面的UI服务器控制层次结构。


OnDataBindi ng(从Control继承)引发DataBinding事件。

OnInit(继承自Control)引发Init事件。

OnLoad(继承自Control)引发Load事件。

OnPreRender(继承自Control)引发PreRender事件。

OnUnload(继承自Control)引发Unload事件。

注意服务器控件应该执行任何最终清理,例如关闭文件,关闭数据库连接和丢弃对象,

在服务器控制生命周期的这个阶段。

RaiseBubbleEvent(从Control继承)将

事件的任何来源及其信息分配给控件的父级。

RemovedControl(从Control继承)在控件之后调用

从另一个控件的Controls集合中删除。

Render(从Control继承)将服务器控件内容发送到

提供的HtmlTextWriter对象,将内容写为ren dered

在客户端。

RenderChildren(从Control继承)输出服务器的内容

控制'的孩子到提供的HtmlTextWriter对象,写入要在客户端上呈现的内容。

SaveViewState(从Control继承)保存任何服务器控件

view-state自页面返回服务器后发生的更改。

TrackViewState(从Control继承)导致视图状态跟踪

更改为服务器控件,以便它们可以存储在服务器中

control'的StateBag对象。这个对象可以通过

Control.ViewState属性访问。


参见

HtmlImage类| System.Web.UI.HtmlControls命名空间| Web命名空间
Visual Studio中的
用于C ++编程的托管扩展

基于.NET Framework 1.1版的语法。

文档版本1.1.0。

------ -------------------------------------------------- ------------------------


发表有关此主题的评论。


? 2001-2002微软公司。保留所有权利。

Here is an example of what I am talking about:

asp.net takes what is a very simple, powerful and flexible
concept, http request/response with html for presentation

and turns it into a ridiculously over-complicated kludge
which causes way more problems than it solves by attempting
to turn it into a flat, "event-driven" paradigm

for example:

here is an html image tag

<img src="Image.gif"/>

it has a few extra attributes such as height, width, border

now look at the asp.net documentation for the SAME element (below)

it is never ending

if you look in these asp.net newsgroups you will actually
see people asking questions like "how do i set the src property
of an HtmlImage object?" with asp.net

and then long descriptions of property accesses
and "watch outs" "don''t do it at the wrong time"
"make sure you ..."

APIs are meant to be there to wrap up complex code and
make it simple to handle

this is a REVERSE API it takes something as simple as
an <img/> tag and turns it into something complicated
which wastes peoples time and energy for no benefit whatsoever.

"DataBinding" - piffle - stupid declarative, inflexible rubbish
"UserControls" - flat pointless, inflexible re-invention of a method
with a codeblock (it can''t even callback to the containing
page without a big headache)
"CustomControls" - great! we can create our own pointless aberrations -
oh yes one render method per class only!
i understand that in asp.net 2.0 microsoft has deemed us worthy
of "master pages" - oh my god - i''ve been doing that already
since aspv1.0 its called an asp include page with codeblocks and
callbacks

just who is this written for?

if you can''t query a database and write out some html strings
what can you do?
"viewstate" - oh yes i really needed help with that - not!

C# is fantastic
..NET Framework rocks

what happened to ASP.NET?
it could have been really good
instead its a bad joke foisted on
us professionals by dumbo muppets
.NET Framework Class Library

HtmlImage MembersSee Also
HtmlImage Class | System.Web.UI.HtmlControls Namespace | Web Namespaces
in Visual Studio | Managed Extensions for C++ Programming
HtmlImage overview

Public Constructors
HtmlImage Constructor Initializes a new instance of the HtmlImage
class.

Public Properties
Align Gets or sets the alignment of the image relative to other Web
page elements.
Alt Gets or sets the alternative caption the browser displays if an
image is unavailable or currently downloading and not yet finished.
Attributes (inherited from HtmlControl) Gets a collection of all
attribute name and value pairs expressed on a server control tag within
the .aspx file.
Border Gets or sets the width of a frame for an image.
ClientID (inherited from Control) Gets the server control identifier
generated by ASP.NET.
Controls (inherited from Control) Gets a ControlCollection object that
represents the child controls for a specified server control in the UI
hierarchy.
Disabled (inherited from HtmlControl) Gets or sets a value indicating
whether the HTML server control is disabled.
EnableViewState (inherited from Control) Gets or sets a value
indicating whether the server control persists its view state, and the
view state of any child controls it contains, to the requesting client.

Height Gets or sets the height of the image.
ID (inherited from Control) Gets or sets the programmatic identifier
assigned to the server control.
NamingContainer (inherited from Control) Gets a reference to the server
control''s naming container, which creates a unique namespace for
differentiating between server controls with the same Control.ID
property value.
Page (inherited from Control) Gets a reference to the Page instance
that contains the server control.
Parent (inherited from Control) Gets a reference to the server
control''s parent control in the page control hierarchy.
Site (inherited from Control) Gets information about the Web site to
which the server control belongs.
Src Gets or sets the source of the image file to display.
Style (inherited from HtmlControl) Gets a collection of all cascading
style sheet (CSS) properties applied to a specified HTML server control
in the .aspx file.
TagName (inherited from HtmlControl) Gets the element name of a tag
that contains a runat=server attribute and value pair.
TemplateSourceDirectory (inherited from Control) Gets the virtual
directory of the Page or UserControl that contains the current server
control.
UniqueID (inherited from Control) Gets the unique,
hierarchically-qualified identifier for the server control.
Visible (inherited from Control) Gets or sets a value that indicates
whether a server control is rendered as UI on the page.
Width Gets or sets the width of the image.

Public Methods
DataBind (inherited from Control) Binds a data source to the invoked
server control and all its child controls.
Dispose (inherited from Control) Enables a server control to perform
final clean up before it is released from memory.
Equals (inherited from Object) Overloaded. Determines whether two
Object instances are equal.
FindControl (inherited from Control) Overloaded. Searches the current
naming container for the specified server control.
GetHashCode (inherited from Object) Serves as a hash function for a
particular type, suitable for use in hashing algorithms and data
structures like a hash table.
GetType (inherited from Object) Gets the Type of the current instance.
HasControls (inherited from Control) Determines if the server control
contains any child controls.
RenderControl (inherited from Control) Outputs server control content
to a provided HtmlTextWriter object and stores tracing information
about the control if tracing is enabled.
ResolveUrl (inherited from Control) Converts a URL into one that is
usable on the requesting client.
ToString (inherited from Object) Returns a String that represents the
current Object.

Public Events
DataBinding (inherited from Control) Occurs when the server control
binds to a data source.
Disposed (inherited from Control) Occurs when a server control is
released from memory, which is the last stage of the server control
lifecycle when an ASP.NET page is requested.
Init (inherited from Control) Occurs when the server control is
initialized, which is the first step in the its lifecycle.
Load (inherited from Control) Occurs when the server control is loaded
into the Page object.
PreRender (inherited from Control) Occurs when the server control is
about to render to its containing Page object.
Unload (inherited from Control) Occurs when the server control is
unloaded from memory.

Protected Properties
ChildControlsCreated (inherited from Control) Gets a value that
indicates whether the server control''s child controls have been
created.
Context (inherited from Control) Gets the HttpContext object associated
with the server control for the current Web request.
Events (inherited from Control) Gets a list of event handler delegates
for the control. This property is read-only.
HasChildViewState (inherited from Control) Gets a value indicating
whether the current server control''s child controls have any saved
view-state settings.
IsTrackingViewState (inherited from Control) Gets a value that
indicates whether the server control is saving changes to its view
state.
ViewState (inherited from Control) Gets a dictionary of state
information that allows you to save and restore the view state of a
server control across multiple requests for the same page.
ViewStateIgnoresCase (inherited from Control) Gets a value that
indicates whether the StateBag object is case-insensitive.

Protected Methods
AddedControl (inherited from Control) Called after a control is added
to the Controls collection of another control.
AddParsedSubObject (inherited from Control) Notifies the server control
that an element, either XML or HTML, was parsed, and adds the element
to the server control''s ControlCollection object.
ClearChildViewState (inherited from Control) Deletes the view-state
information for all the server control''s child controls.
CreateChildControls (inherited from Control) Notifies server controls
that use composition-based implementation to create any child controls
they contain in preparation for posting back or rendering.
CreateControlCollection (inherited from Control) Creates a new
ControlCollection object to hold the child controls (both literal and
server) of the server control.
EnsureChildControls (inherited from Control) Determines whether the
server control contains child controls. If it does not, it creates
child controls.
Finalize (inherited from Object) Overridden. Allows an Object to
attempt to free resources and perform other cleanup operations before
the Object is reclaimed by garbage collection.
In C# and C++, finalizers are expressed using destructor syntax.

IsLiteralContent (inherited from Control) Determines if the server
control holds only literal content.
LoadViewState (inherited from Control) Restores view-state information
from a previous page request that was saved by the SaveViewState
method.
MapPathSecure (inherited from Control) Retrieves the physical path that
a virtual path, either absolute or relative, maps to.
MemberwiseClone (inherited from Object) Creates a shallow copy of the
current Object.
OnBubbleEvent (inherited from Control) Determines whether the event for
the server control is passed up the page''s UI server control hierarchy.

OnDataBinding (inherited from Control) Raises the DataBinding event.
OnInit (inherited from Control) Raises the Init event.
OnLoad (inherited from Control) Raises the Load event.
OnPreRender (inherited from Control) Raises the PreRender event.
OnUnload (inherited from Control) Raises the Unload event.
Note Server controls should perform any final cleanup, such as
closing files, closing database connections, and discarding objects,
during this stage of the server control lifecycle.
RaiseBubbleEvent (inherited from Control) Assigns any sources of the
event and its information to the control''s parent.
RemovedControl (inherited from Control) Called after a control is
removed from the Controls collection of another control.
Render (inherited from Control) Sends server control content to a
provided HtmlTextWriter object, which writes the content to be rendered
on the client.
RenderChildren (inherited from Control) Outputs the content of a server
control''s children to a provided HtmlTextWriter object, which writes
the content to be rendered on the client.
SaveViewState (inherited from Control) Saves any server control
view-state changes that have occurred since the time the page was
posted back to the server.
TrackViewState (inherited from Control) Causes tracking of view-state
changes to the server control so they can be stored in the server
control''s StateBag object. This object is accessible through the
Control.ViewState property.

See Also
HtmlImage Class | System.Web.UI.HtmlControls Namespace | Web Namespaces
in Visual Studio | Managed Extensions for C++ Programming
Syntax based on .NET Framework version 1.1.
Documentation version 1.1.0.
--------------------------------------------------------------------------------

Send comments on this topic.

? 2001-2002 Microsoft Corporation. All rights reserved.

推荐答案

ASP.NET可以轻松编写WYSIWYG应用程序,并且可以轻松实现$ /
处理控制事件。


如果那不是您使用的模型,使用IDE并编写

应用程序可能会比较困难只是WYSIWYG的东西。但是,它不会比过去更困难,因为你可以只做

确切的事情!


ASP.NET的强大功能在于它的面向对象性质,你可以用它来做很多的事情

。实际上,这可以使大量的事情变得更容易。


VS.NET IDE不适合创建复杂的UI。我想大多数人

会同意这个。


但是,考虑到大多数ASP,是人们使用Response.Write发出

HTML,数据绑定看起来对我来说是一个相当不错的改进。


我认为大多数有ASP.NET问题的人都是那些习惯于

使用不同的技术以不同的方式做事,并且有麻烦将他们的想法转移到使用不同的模型来编写

应用程序。


嘿,如果你不喜欢它,没有人说你必须使用它。写下

您认为最好的技术。

John Rivers <音响***** @ btinternet.com>在留言中写道

news:11 ********************** @ g14g2000cwa.googlegr oups.com ...

以下是我所谈论的一个例子


asp.net采取的是一个非常简单,强大和灵活的

概念,http请求/响应与html进行演示


并将其变成一个可笑的过于复杂的kludge

导致更多问题通过尝试将b $ b变为平面,事件驱动来解决问题。范例


例如:


这里是一个html图片标签


< img src =" Image.gif" />


它有一些额外的属性,如高度,宽度,边框


现在看看相同元素的asp.net文档(如下)


它永远不会结束


如果你看看这些asp.net新闻组你实际上将会看到人们提出的问题,例如我如何设置src属性

的HtmlImage对象?与asp.net


然后是物业访问的长描述

和watch out; 不要在错误的时间做

确保你......


API意味着在那里包装复杂的代码和

使其易于处理


这是一个REVERSE API它需要一些简单的事情

an < IMG />标记并将其变成复杂的东西

这会浪费人们的时间和精力,无论如何都没有任何好处。


" DataBinding" - piffle - 愚蠢的陈述性,不灵活的垃圾

" UserControls" - 平坦无意义,不灵活地重新发明一个方法

带有一个代码块(它甚至不能回调到包含

页面而没有头痛)
" CustomControls" - 好极了!我们可以创造我们自己无意义的偏差 -

哦只是每个类只有一种渲染方法!

i明白在asp.net 2.0中微软已经认为我们值得付出

的母版页 - 哦,我的上帝 - 我一直这样做已经

自aspv1.0以来它被称为asp包含页面的代​​码块和

回调

这是为谁写的?


如果你不能查询数据库并写出一些html字符串

你有什么可以吗?

" viewstate" - 哦,是的,我真的需要帮助 - 不是!


C#很棒

..NET框架摇滚


ASP.NET发生了什么?

它可能真的很好

反而是一个糟糕的笑话强加于

美国专业人士的dumbo muppets

.NET Framework类库


HtmlImage MembersSee还

HtmlImage类| System.Web.UI.HtmlControls命名空间| Web命名空间
Visual Studio中的
用于C ++编程的托管扩展

HtmlImage概述

公共构造函数

HtmlImage构造函数初始化HtmlImage的新实例

class。


公共属性

Align获取或设置图像相对于其他Web的对齐
页面元素。

Alt获取或设置浏览器显示的替代标题,如果

图像不可用或当前正在下载但尚未完成。

属性(继承自HtmlControl)获取

.aspx文件中服务器控件标记上表示的所有

属性名称和值对的集合。

Border获取或设置图像框架的宽度。

ClientID(从Control继承)获取ASP.NET生成的服务器控件标识符



Controls(从Control继承)获取一个ControlCollection对象,

代表一个speci的子控件用户界面中的虚拟服务器控件

层次结构。

禁用(继承自HtmlControl)获取或设置一个值,表示

HTML服务器控件是否为已禁用。

EnableViewState(从Control继承)获取或设置一个值

,指示服务器控件是否持续其视图状态,以及

视图它包含的任何子控件的状态,请求客户端。


Height获取或设置图像的高度。

ID(从Control继承)获取或设置分配给服务器控件的程序标识符



NamingContainer(继承自Control)获取对服务器的引用

control'' s命名容器,它为

创建一个唯一的命名空间,区分具有相同Control.ID

属性值的服务器控件。

Page(继承来自Control)获取对包含服务器控件的Page实例

的引用ol。

Parent(从Control继承)获取对服务器的引用

控件在页面控件层次结构中的父控件。

站点(从Control继承)获取有关服务器控件所属的网站的信息



Src获取或设置要显示的图像文件的来源。 />
Style(继承自HtmlControl)获取应用于指定HTML服务器控件的所有级联

样式表(CSS)属性的集合

in。 aspx文件。

TagName(继承自HtmlControl)获取标签的元素名称

包含runat = server属性和值对。

TemplateSourceDirectory(从Control继承)获取包含当前服务器的页面或UserControl的虚拟

目录

控件。

UniqueID(继承)来自Control)获取服务器控件的唯一,

分层限定标识符。

可见(从Control继承)获取或设置一个值,该值指示

服务器控件是否在页面上呈现为UI。

Width获取或设置图像的宽度。


公共方法

DataBind(从Control继承)将数据源绑定到调用的

服务器控件及其所有子控件。

Dispose(继承自Control)使服务器控件在从内存中释放之前执行最终清理。

Equals(继承自Object)已重载。确定两个

对象实例是否相等。

FindControl(从Control继承)重载。搜索指定服务器控件的当前

命名容器。

GetHashCode(继承自Object)用作

特定类型的哈希函数,适用于哈希算法和数据

结构,如哈希表。

GetType(继承自Object)获取当前实例的Type。

HasControls(继承自Control)确定服务器控件

是否包含任何子控件。

RenderControl(从Control继承)输出服务器控件内容

到提供的HtmlTextWriter对象,如果启用了跟踪,则存储关于控件的跟踪信息



ResolveUrl(从Control继承)将URL转换为

可在请求客户端上使用。

ToString(继承自Object)返回表示

当前对象的String。


公共事件

DataBinding(继承自Contr ol)当服务器控件

绑定到数据源时发生。

Disposed(从Control继承)当服务器控件发布时发生
发布来自内存,这是服务器控件的最后一个阶段

请求ASP.NET页面时的生命周期。

Init(从Control继承)当服务器控件是

已初始化,这是其生命周期的第一步。

加载(继承自Control)在加载服务器控件时发生

into Page对象。

PreRender(继承自Control)当服务器控件即将渲染到其包含的Page对象时发生。

卸载(从Control继承)当服务器控件从内存中卸载时发生。


受保护的属性

ChildControlsCreated(继承自Control )获取一个值

表示服务器控件的子控件是否已经

creat ed。

Context(从Control继承)获取与当前Web请求的服务器控件关联的HttpContext对象



事件(继承来自Control)获取控件的事件处理程序委托列表

。此属性是只读的。

HasChildViewState(从Control继承)获取一个值,指示

当前服务器控件的子控件是否已保存

视图状态设置。

IsTrackingViewState(从Control继承)获取一个值

表示服务器控件是否正在保存对其视图的更改

state。

ViewState(继承自Control)获取状态字典

信息,允许您保存和恢复视图状态

跨同一页面的多个请求的服务器控制。

ViewStateIgnoresCase(从Control继承)获取一个值

指示StateBag对象是否不区分大小写。


受保护的方法

AddedControl(继承自Control)在控件添加后调用

到另一个控件的Controls集合。

AddParsedSubObject(从Control继承)通知服务器控件

解析了一个元素(XML或HTML),并将元素

添加到服务器控件的ControlCollection对象。

ClearChildViewState(继承自Control)删除所有服务器控件的子控件的视图状态

信息。

CreateChildControls(继承自Control)通知服务器控件

使用基于组合的实现来创建任何子控件

它们包含以准备回发或渲染。

CreateControlCollection(继承自Control )创建一个新的

ControlCollection对象来保存服务器控件的子控件(文字和

服务器)。

EnsureChildControls(继承自Control)确定

服务器控件是否包含子控件。如果没有,它会创建

子控件。

Finalize(继承自Object)重写。允许对象

尝试释放资源并执行其他清理操作

垃圾回收对象回收。

在C#和C ++中,终结符用析构函数语法表示。


IsLiteralContent(继承自Control)确定服务器

控件是否只保存文字内容。

LoadViewState(从Control继承)从SaveViewState

方法保存的上一页请求中恢复视图状态信息



MapPathSecure(从Control继承)检索物理路径

a虚拟路径,无论是绝对路径还是相对路径,映射到。

MemberwiseClone(继承自Object)创建一个浅层副本

当前对象。

OnBubbleEvent(继承自Control)确定服务器控件的事件是否传递给页面的UI服务器控制层次结构。


OnDataBindi ng(从Control继承)引发DataBinding事件。

OnInit(继承自Control)引发Init事件。

OnLoad(继承自Control)引发Load事件。

OnPreRender(继承自Control)引发PreRender事件。

OnUnload(继承自Control)引发Unload事件。

注意服务器控件应该执行任何最终清理,例如关闭文件,关闭数据库连接和丢弃对象,

在服务器控制生命周期的这个阶段。

RaiseBubbleEvent(从Control继承)将

事件的任何来源及其信息分配给控件的父级。

RemovedControl(从Control继承)在控件之后调用

从另一个控件的Controls集合中删除。

Render(从Control继承)将服务器控件内容发送到

提供的HtmlTextWriter对象,将内容写为ren dered

在客户端。

RenderChildren(从Control继承)输出服务器的内容

控制'的孩子到提供的HtmlTextWriter对象,写入要在客户端上呈现的内容。

SaveViewState(从Control继承)保存任何服务器控件

view-state自页面返回服务器后发生的更改。

TrackViewState(从Control继承)导致视图状态跟踪

更改为服务器控件,以便它们可以存储在服务器中

control'的StateBag对象。这个对象可以通过

Control.ViewState属性访问。


参见

HtmlImage类| System.Web.UI.HtmlControls命名空间| Web命名空间
Visual Studio中的
用于C ++编程的托管扩展

基于.NET Framework 1.1版的语法。

文档版本1.1.0。

------ -------------------------------------------------- ------------------------


发表有关此主题的评论。


? 2001-2002微软公司。保留所有权利。
ASP.NET makes it easy to write WYSIWYG applications, and makes it easy to
handle control events.

If that is not the model you are using, that using the IDE and writing your
application may be more difficult then just the WYSIWYG stuff. But, it won''t
be any more difficult then it was in the past, since you can just do the
exact kind of thing!

ASP.NET''s power is in its object oriented nature, and you can do quite a lot
with that. In fact, that can make tons and tons of things easier.

The VS.NET IDE is not suited for creating complex UIs. I think most people
will agree on this.

But, considering that most of ASP, is people using Response.Write to emit
HTML, databinding looks like a pretty good improvement to me.

I think most people who have trouble with ASP.NET, are those who are used to
doing things a different way using a different technology, and are having
trouble shifting their thinking into using a different model for writing
applications.

And hey, if you don''t like it, no one says you have to use it. Write in
whatever technology you feel is best.
"John Rivers" <fi*****@btinternet.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Here is an example of what I am talking about:

asp.net takes what is a very simple, powerful and flexible
concept, http request/response with html for presentation

and turns it into a ridiculously over-complicated kludge
which causes way more problems than it solves by attempting
to turn it into a flat, "event-driven" paradigm

for example:

here is an html image tag

<img src="Image.gif"/>

it has a few extra attributes such as height, width, border

now look at the asp.net documentation for the SAME element (below)

it is never ending

if you look in these asp.net newsgroups you will actually
see people asking questions like "how do i set the src property
of an HtmlImage object?" with asp.net

and then long descriptions of property accesses
and "watch outs" "don''t do it at the wrong time"
"make sure you ..."

APIs are meant to be there to wrap up complex code and
make it simple to handle

this is a REVERSE API it takes something as simple as
an <img/> tag and turns it into something complicated
which wastes peoples time and energy for no benefit whatsoever.

"DataBinding" - piffle - stupid declarative, inflexible rubbish
"UserControls" - flat pointless, inflexible re-invention of a method
with a codeblock (it can''t even callback to the containing
page without a big headache)
"CustomControls" - great! we can create our own pointless aberrations -
oh yes one render method per class only!
i understand that in asp.net 2.0 microsoft has deemed us worthy
of "master pages" - oh my god - i''ve been doing that already
since aspv1.0 its called an asp include page with codeblocks and
callbacks

just who is this written for?

if you can''t query a database and write out some html strings
what can you do?
"viewstate" - oh yes i really needed help with that - not!

C# is fantastic
..NET Framework rocks

what happened to ASP.NET?
it could have been really good
instead its a bad joke foisted on
us professionals by dumbo muppets
.NET Framework Class Library

HtmlImage MembersSee Also
HtmlImage Class | System.Web.UI.HtmlControls Namespace | Web Namespaces
in Visual Studio | Managed Extensions for C++ Programming
HtmlImage overview

Public Constructors
HtmlImage Constructor Initializes a new instance of the HtmlImage
class.

Public Properties
Align Gets or sets the alignment of the image relative to other Web
page elements.
Alt Gets or sets the alternative caption the browser displays if an
image is unavailable or currently downloading and not yet finished.
Attributes (inherited from HtmlControl) Gets a collection of all
attribute name and value pairs expressed on a server control tag within
the .aspx file.
Border Gets or sets the width of a frame for an image.
ClientID (inherited from Control) Gets the server control identifier
generated by ASP.NET.
Controls (inherited from Control) Gets a ControlCollection object that
represents the child controls for a specified server control in the UI
hierarchy.
Disabled (inherited from HtmlControl) Gets or sets a value indicating
whether the HTML server control is disabled.
EnableViewState (inherited from Control) Gets or sets a value
indicating whether the server control persists its view state, and the
view state of any child controls it contains, to the requesting client.

Height Gets or sets the height of the image.
ID (inherited from Control) Gets or sets the programmatic identifier
assigned to the server control.
NamingContainer (inherited from Control) Gets a reference to the server
control''s naming container, which creates a unique namespace for
differentiating between server controls with the same Control.ID
property value.
Page (inherited from Control) Gets a reference to the Page instance
that contains the server control.
Parent (inherited from Control) Gets a reference to the server
control''s parent control in the page control hierarchy.
Site (inherited from Control) Gets information about the Web site to
which the server control belongs.
Src Gets or sets the source of the image file to display.
Style (inherited from HtmlControl) Gets a collection of all cascading
style sheet (CSS) properties applied to a specified HTML server control
in the .aspx file.
TagName (inherited from HtmlControl) Gets the element name of a tag
that contains a runat=server attribute and value pair.
TemplateSourceDirectory (inherited from Control) Gets the virtual
directory of the Page or UserControl that contains the current server
control.
UniqueID (inherited from Control) Gets the unique,
hierarchically-qualified identifier for the server control.
Visible (inherited from Control) Gets or sets a value that indicates
whether a server control is rendered as UI on the page.
Width Gets or sets the width of the image.

Public Methods
DataBind (inherited from Control) Binds a data source to the invoked
server control and all its child controls.
Dispose (inherited from Control) Enables a server control to perform
final clean up before it is released from memory.
Equals (inherited from Object) Overloaded. Determines whether two
Object instances are equal.
FindControl (inherited from Control) Overloaded. Searches the current
naming container for the specified server control.
GetHashCode (inherited from Object) Serves as a hash function for a
particular type, suitable for use in hashing algorithms and data
structures like a hash table.
GetType (inherited from Object) Gets the Type of the current instance.
HasControls (inherited from Control) Determines if the server control
contains any child controls.
RenderControl (inherited from Control) Outputs server control content
to a provided HtmlTextWriter object and stores tracing information
about the control if tracing is enabled.
ResolveUrl (inherited from Control) Converts a URL into one that is
usable on the requesting client.
ToString (inherited from Object) Returns a String that represents the
current Object.

Public Events
DataBinding (inherited from Control) Occurs when the server control
binds to a data source.
Disposed (inherited from Control) Occurs when a server control is
released from memory, which is the last stage of the server control
lifecycle when an ASP.NET page is requested.
Init (inherited from Control) Occurs when the server control is
initialized, which is the first step in the its lifecycle.
Load (inherited from Control) Occurs when the server control is loaded
into the Page object.
PreRender (inherited from Control) Occurs when the server control is
about to render to its containing Page object.
Unload (inherited from Control) Occurs when the server control is
unloaded from memory.

Protected Properties
ChildControlsCreated (inherited from Control) Gets a value that
indicates whether the server control''s child controls have been
created.
Context (inherited from Control) Gets the HttpContext object associated
with the server control for the current Web request.
Events (inherited from Control) Gets a list of event handler delegates
for the control. This property is read-only.
HasChildViewState (inherited from Control) Gets a value indicating
whether the current server control''s child controls have any saved
view-state settings.
IsTrackingViewState (inherited from Control) Gets a value that
indicates whether the server control is saving changes to its view
state.
ViewState (inherited from Control) Gets a dictionary of state
information that allows you to save and restore the view state of a
server control across multiple requests for the same page.
ViewStateIgnoresCase (inherited from Control) Gets a value that
indicates whether the StateBag object is case-insensitive.

Protected Methods
AddedControl (inherited from Control) Called after a control is added
to the Controls collection of another control.
AddParsedSubObject (inherited from Control) Notifies the server control
that an element, either XML or HTML, was parsed, and adds the element
to the server control''s ControlCollection object.
ClearChildViewState (inherited from Control) Deletes the view-state
information for all the server control''s child controls.
CreateChildControls (inherited from Control) Notifies server controls
that use composition-based implementation to create any child controls
they contain in preparation for posting back or rendering.
CreateControlCollection (inherited from Control) Creates a new
ControlCollection object to hold the child controls (both literal and
server) of the server control.
EnsureChildControls (inherited from Control) Determines whether the
server control contains child controls. If it does not, it creates
child controls.
Finalize (inherited from Object) Overridden. Allows an Object to
attempt to free resources and perform other cleanup operations before
the Object is reclaimed by garbage collection.
In C# and C++, finalizers are expressed using destructor syntax.

IsLiteralContent (inherited from Control) Determines if the server
control holds only literal content.
LoadViewState (inherited from Control) Restores view-state information
from a previous page request that was saved by the SaveViewState
method.
MapPathSecure (inherited from Control) Retrieves the physical path that
a virtual path, either absolute or relative, maps to.
MemberwiseClone (inherited from Object) Creates a shallow copy of the
current Object.
OnBubbleEvent (inherited from Control) Determines whether the event for
the server control is passed up the page''s UI server control hierarchy.

OnDataBinding (inherited from Control) Raises the DataBinding event.
OnInit (inherited from Control) Raises the Init event.
OnLoad (inherited from Control) Raises the Load event.
OnPreRender (inherited from Control) Raises the PreRender event.
OnUnload (inherited from Control) Raises the Unload event.
Note Server controls should perform any final cleanup, such as
closing files, closing database connections, and discarding objects,
during this stage of the server control lifecycle.
RaiseBubbleEvent (inherited from Control) Assigns any sources of the
event and its information to the control''s parent.
RemovedControl (inherited from Control) Called after a control is
removed from the Controls collection of another control.
Render (inherited from Control) Sends server control content to a
provided HtmlTextWriter object, which writes the content to be rendered
on the client.
RenderChildren (inherited from Control) Outputs the content of a server
control''s children to a provided HtmlTextWriter object, which writes
the content to be rendered on the client.
SaveViewState (inherited from Control) Saves any server control
view-state changes that have occurred since the time the page was
posted back to the server.
TrackViewState (inherited from Control) Causes tracking of view-state
changes to the server control so they can be stored in the server
control''s StateBag object. This object is accessible through the
Control.ViewState property.

See Also
HtmlImage Class | System.Web.UI.HtmlControls Namespace | Web Namespaces
in Visual Studio | Managed Extensions for C++ Programming
Syntax based on .NET Framework version 1.1.
Documentation version 1.1.0.
--------------------------------------------------------------------------------

Send comments on this topic.

? 2001-2002 Microsoft Corporation. All rights reserved.


这就是我希望对你的困境一个简化的答案 - 不要

使用ASP .NET?

" John Rivers" <音响***** @ btinternet.com>在留言中写道

news:11 ********************** @ g14g2000cwa.googlegr oups.com ...

以下是我所谈论的一个例子


asp.net采取的是一个非常简单,强大和灵活的

概念,http请求/响应与html进行演示


并将其变成一个可笑的过于复杂的kludge

导致更多问题通过尝试将b $ b变为平面,事件驱动来解决问题。范例


例如:


这里是一个html图片标签


< img src =" Image.gif" />


它有一些额外的属性,如高度,宽度,边框


现在看看相同元素的asp.net文档(如下)


它永远不会结束


如果你看看这些asp.net新闻组你实际上将会看到人们提出的问题,例如我如何设置src属性

的HtmlImage对象?与asp.net


然后是物业访问的长描述

和watch out; 不要在错误的时间做

确保你......


API意味着在那里wrap up complex code and

make it simple to handle


this is a REVERSE API it takes something as simple as

an <img/> tag and turns it into something complicated

which wastes peoples time and energy for no benefit whatsoever.


"DataBinding" - piffle - stupid declarative, inflexible rubbish

"UserControls" - flat pointless, inflexible re-invention of a method

with a codeblock (it can’’t even callback to the containing

page without a big headache)

"CustomControls" - great! we can create our own pointless aberrations -

oh yes one render method per class only!

i understand that in asp.net 2.0 microsoft has deemed us worthy

of "master pages" - oh my god - i’’ve been doing that already

since aspv1.0 its called an asp include page with codeblocks and

callbacks


just who is this written for?


if you can’’t query a database and write out some html strings

what can you do?

"viewstate" - oh yes i really needed help with that - not!


C# is fantastic

..NET Framework rocks


what happened to ASP.NET?

it could have been really good

instead its a bad joke foisted on

us professionals by dumbo muppets

.NET Framework Class Library


HtmlImage MembersSee Also

HtmlImage Class | System.Web.UI.HtmlControls Namespace | Web Namespaces

in Visual Studio | Managed Extensions for C++ Programming

HtmlImage overview


Public Constructors

HtmlImage Constructor Initializes a new instance of the HtmlImage

class.


Public Properties

Align Gets or sets the alignment of the image relative to other Web

page elements.

Alt Gets or sets the alternative caption the browser displays if an

image is unavailable or currently downloading and not yet finished.

Attributes (inherited from HtmlControl) Gets a collection of all

attribute name and value pairs expressed on a server control tag within

the .aspx file.

Border Gets or sets the width of a frame for an image.

ClientID (inherited from Control) Gets the server control identifier

generated by ASP.NET.

Controls (inherited from Control) Gets a ControlCollection object that

represents the child controls for a speci fied server control in the UI

hierarchy.

Disabled (inherited from HtmlControl) Gets or sets a value indicating

whether the HTML server control is disabled.

EnableViewState (inherited from Control) Gets or sets a value

indicating whether the server control persists its view state, and the

view state of any child controls it contains, to the requesting client.


Height Gets or sets the height of the image.

ID (inherited from Control) Gets or sets the programmatic identifier

assigned to the server control.

NamingContainer (inherited from Control) Gets a reference to the server

control’’s naming container, which creates a unique namespace for

differentiating between server controls with the same Control.ID

property value.

Page (inherited from Control) Gets a reference to the Page instance

that contains the server contr ol.

Parent (inherited from Control) Gets a reference to the server

control’’s parent control in the page control hierarchy.

Site (inherited from Control) Gets information about the Web site to

which the server control belongs.

Src Gets or sets the source of the image file to display.

Style (inherited from HtmlControl) Gets a collection of all cascading

style sheet (CSS) properties applied to a specified HTML server control

in the .aspx file.

TagName (inherited from HtmlControl) Gets the element name of a tag

that contains a runat=server attribute and value pair.

TemplateSourceDirectory (inherited from Control) Gets the virtual

directory of the Page or UserControl that contains the current server

control.

UniqueID (inherited from Control) Gets the unique,

hierarchically-qualified identifier for the server control.

Visible (inherited from Control) Gets or sets a value that indicates

whether a server control is rendered as UI on the page.

Width Gets or sets the width of the image.


Public Methods

DataBind (inherited from Control) Binds a data source to the invoked

server control and all its child controls.

Dispose (inherited from Control) Enables a server control to perform

final clean up before it is released from memory.

Equals (inherited from Object) Overloaded. Determines whether two

Object instances are equal.

FindControl (inherited from Control) Overloaded. Searches the current

naming container for the specified server control.

GetHashCode (inherited from Object) Serves as a hash function for a

particular type, suitable for use in hashing algorithms and data

structures like a hash table.

GetType (inherited from Object) Gets the Type of the current instance.

HasControls (inherited from Control) Determines if the server control

contains any child controls.

RenderControl (inherited from Control) Outputs server control content

to a provided HtmlTextWriter object and stores tracing information

about the control if tracing is enabled.

ResolveUrl (inherited from Control) Converts a URL into one that is

usable on the requesting client.

ToString (inherited from Object) Returns a String that represents the

current Object.


Public Events

DataBinding (inherited from Contr ol) Occurs when the server control

binds to a data source.

Disposed (inherited from Control) Occurs when a server control is

released from memory, which is the last stage of the server control

lifecycle when an ASP.NET page is requested.

Init (inherited from Control) Occurs when the server control is

initialized, which is the first step in the its lifecycle.

Load (inherited from Control) Occurs when the server control is loaded

into the Page object.

PreRender (inherited from Control) Occurs when the server control is

about to render to its containing Page object.

Unload (inherited from Control) Occurs when the server control is

unloaded from memory.


Protected Properties

ChildControlsCreated (inherited from Control) Gets a value that

indicates whether the server control’’s child controls have been

creat ed.

Context (inherited from Control) Gets the HttpContext object associated

with the server control for the current Web request.

Events (inherited from Control) Gets a list of event handler delegates

for the control. This property is read-only.

HasChildViewState (inherited from Control) Gets a value indicating

whether the current server control’’s child controls have any saved

view-state settings.

IsTrackingViewState (inherited from Control) Gets a value that

indicates whether the server control is saving changes to its view

state.

ViewState (inherited from Control) Gets a dictionary of state

information that allows you to save and restore the view state of a

server control across multiple requests for the same page.

ViewStateIgnoresCase (inherited from Control) Gets a value that

indicates whether the StateBag object is case-insensitive.


Protected Methods

AddedControl (inherited from Control) Called after a control is added

to the Controls collection of another control.

AddParsedSubObject (inherited from Control) Notifies the server control

that an element, either XML or HTML, was parsed, and adds the element

to the server control’’s ControlCollection object.

ClearChildViewState (inherited from Control) Deletes the view-state

information for all the server control’’s child controls.

CreateChildControls (inherited from Control) Notifies server controls

that use composition-based implementation to create any child controls

they contain in preparation for posting back or rendering.

CreateControlCollection (inherited from Control) Creates a new

ControlCollection object to hold the child controls (both literal and

server) of the server control.

EnsureChildControls (inherited from Control) Determines whether the

server control contains child controls. If it does not, it creates

child controls.

Finalize (inherited from Object) Overridden. Allows an Object to

attempt to free resources and perform other cleanup operations before

the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.


IsLiteralContent (inherited from Control) Determines if the server

control holds only literal content.

LoadViewState (inherited from Control) Restores view-state information

from a previous page request that was saved by the SaveViewState

method.

MapPathSecure (inherited from Control) Retrieves the physical path that

a virtual path, either absolute or relative, maps to.

MemberwiseClone (inherited from Object) Creates a shallow copy of the

current Object.

OnBubbleEvent (inherited from Control) Determines whether the event for

the server control is passed up the page’’s UI server control hierarchy.


OnDataBindi ng (inherited from Control) Raises the DataBinding event.

OnInit (inherited from Control) Raises the Init event.

OnLoad (inherited from Control) Raises the Load event.

OnPreRender (inherited from Control) Raises the PreRender event.

OnUnload (inherited from Control) Raises the Unload event.

Note Server controls should perform any final cleanup, such as

closing files, closing database connections, and discarding objects,

during this stage of the server control lifecycle.

RaiseBubbleEvent (inherited from Control) Assigns any sources of the

event and its information to the control’’s parent.

RemovedControl (inherited from Control) Called after a control is

removed from the Controls collection of another control.

Render (inherited from Control) Sends server control content to a

provided HtmlTextWriter object, which writes the content to be ren dered

on the client.

RenderChildren (inherited from Control) Outputs the content of a server

control’’s children to a provided HtmlTextWriter object, which writes

the content to be rendered on the client.

SaveViewState (inherited from Control) Saves any server control

view-state changes that have occurred since the time the page was

posted back to the server.

TrackViewState (inherited from Control) Causes tracking of view-state

changes to the server control so they can be stored in the server

control’’s StateBag object. This object is accessible through the

Control.ViewState property.


See Also

HtmlImage Class | System.Web.UI.HtmlControls Namespace | Web Namespaces

in Visual Studio | Managed Extensions for C++ Programming

Syntax based on .NET Framework version 1.1.

Documentation version 1.1.0.

--------------------------------------------------------------------------------


Send comments on this topic.


? 2001-2002 Microsoft Corporation. All rights reserved.
Here''s what I hope is an under-simplified answer to your dillemma - don''t
use ASP.NET?
"John Rivers" <fi*****@btinternet.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Here is an example of what I am talking about:

asp.net takes what is a very simple, powerful and flexible
concept, http request/response with html for presentation

and turns it into a ridiculously over-complicated kludge
which causes way more problems than it solves by attempting
to turn it into a flat, "event-driven" paradigm

for example:

here is an html image tag

<img src="Image.gif"/>

it has a few extra attributes such as height, width, border

now look at the asp.net documentation for the SAME element (below)

it is never ending

if you look in these asp.net newsgroups you will actually
see people asking questions like "how do i set the src property
of an HtmlImage object?" with asp.net

and then long descriptions of property accesses
and "watch outs" "don''t do it at the wrong time"
"make sure you ..."

APIs are meant to be there to wrap up complex code and
make it simple to handle

this is a REVERSE API it takes something as simple as
an <img/> tag and turns it into something complicated
which wastes peoples time and energy for no benefit whatsoever.

"DataBinding" - piffle - stupid declarative, inflexible rubbish
"UserControls" - flat pointless, inflexible re-invention of a method
with a codeblock (it can''t even callback to the containing
page without a big headache)
"CustomControls" - great! we can create our own pointless aberrations -
oh yes one render method per class only!
i understand that in asp.net 2.0 microsoft has deemed us worthy
of "master pages" - oh my god - i''ve been doing that already
since aspv1.0 its called an asp include page with codeblocks and
callbacks

just who is this written for?

if you can''t query a database and write out some html strings
what can you do?
"viewstate" - oh yes i really needed help with that - not!

C# is fantastic
..NET Framework rocks

what happened to ASP.NET?
it could have been really good
instead its a bad joke foisted on
us professionals by dumbo muppets
.NET Framework Class Library

HtmlImage MembersSee Also
HtmlImage Class | System.Web.UI.HtmlControls Namespace | Web Namespaces
in Visual Studio | Managed Extensions for C++ Programming
HtmlImage overview

Public Constructors
HtmlImage Constructor Initializes a new instance of the HtmlImage
class.

Public Properties
Align Gets or sets the alignment of the image relative to other Web
page elements.
Alt Gets or sets the alternative caption the browser displays if an
image is unavailable or currently downloading and not yet finished.
Attributes (inherited from HtmlControl) Gets a collection of all
attribute name and value pairs expressed on a server control tag within
the .aspx file.
Border Gets or sets the width of a frame for an image.
ClientID (inherited from Control) Gets the server control identifier
generated by ASP.NET.
Controls (inherited from Control) Gets a ControlCollection object that
represents the child controls for a specified server control in the UI
hierarchy.
Disabled (inherited from HtmlControl) Gets or sets a value indicating
whether the HTML server control is disabled.
EnableViewState (inherited from Control) Gets or sets a value
indicating whether the server control persists its view state, and the
view state of any child controls it contains, to the requesting client.

Height Gets or sets the height of the image.
ID (inherited from Control) Gets or sets the programmatic identifier
assigned to the server control.
NamingContainer (inherited from Control) Gets a reference to the server
control''s naming container, which creates a unique namespace for
differentiating between server controls with the same Control.ID
property value.
Page (inherited from Control) Gets a reference to the Page instance
that contains the server control.
Parent (inherited from Control) Gets a reference to the server
control''s parent control in the page control hierarchy.
Site (inherited from Control) Gets information about the Web site to
which the server control belongs.
Src Gets or sets the source of the image file to display.
Style (inherited from HtmlControl) Gets a collection of all cascading
style sheet (CSS) properties applied to a specified HTML server control
in the .aspx file.
TagName (inherited from HtmlControl) Gets the element name of a tag
that contains a runat=server attribute and value pair.
TemplateSourceDirectory (inherited from Control) Gets the virtual
directory of the Page or UserControl that contains the current server
control.
UniqueID (inherited from Control) Gets the unique,
hierarchically-qualified identifier for the server control.
Visible (inherited from Control) Gets or sets a value that indicates
whether a server control is rendered as UI on the page.
Width Gets or sets the width of the image.

Public Methods
DataBind (inherited from Control) Binds a data source to the invoked
server control and all its child controls.
Dispose (inherited from Control) Enables a server control to perform
final clean up before it is released from memory.
Equals (inherited from Object) Overloaded. Determines whether two
Object instances are equal.
FindControl (inherited from Control) Overloaded. Searches the current
naming container for the specified server control.
GetHashCode (inherited from Object) Serves as a hash function for a
particular type, suitable for use in hashing algorithms and data
structures like a hash table.
GetType (inherited from Object) Gets the Type of the current instance.
HasControls (inherited from Control) Determines if the server control
contains any child controls.
RenderControl (inherited from Control) Outputs server control content
to a provided HtmlTextWriter object and stores tracing information
about the control if tracing is enabled.
ResolveUrl (inherited from Control) Converts a URL into one that is
usable on the requesting client.
ToString (inherited from Object) Returns a String that represents the
current Object.

Public Events
DataBinding (inherited from Control) Occurs when the server control
binds to a data source.
Disposed (inherited from Control) Occurs when a server control is
released from memory, which is the last stage of the server control
lifecycle when an ASP.NET page is requested.
Init (inherited from Control) Occurs when the server control is
initialized, which is the first step in the its lifecycle.
Load (inherited from Control) Occurs when the server control is loaded
into the Page object.
PreRender (inherited from Control) Occurs when the server control is
about to render to its containing Page object.
Unload (inherited from Control) Occurs when the server control is
unloaded from memory.

Protected Properties
ChildControlsCreated (inherited from Control) Gets a value that
indicates whether the server control''s child controls have been
created.
Context (inherited from Control) Gets the HttpContext object associated
with the server control for the current Web request.
Events (inherited from Control) Gets a list of event handler delegates
for the control. This property is read-only.
HasChildViewState (inherited from Control) Gets a value indicating
whether the current server control''s child controls have any saved
view-state settings.
IsTrackingViewState (inherited from Control) Gets a value that
indicates whether the server control is saving changes to its view
state.
ViewState (inherited from Control) Gets a dictionary of state
information that allows you to save and restore the view state of a
server control across multiple requests for the same page.
ViewStateIgnoresCase (inherited from Control) Gets a value that
indicates whether the StateBag object is case-insensitive.

Protected Methods
AddedControl (inherited from Control) Called after a control is added
to the Controls collection of another control.
AddParsedSubObject (inherited from Control) Notifies the server control
that an element, either XML or HTML, was parsed, and adds the element
to the server control''s ControlCollection object.
ClearChildViewState (inherited from Control) Deletes the view-state
information for all the server control''s child controls.
CreateChildControls (inherited from Control) Notifies server controls
that use composition-based implementation to create any child controls
they contain in preparation for posting back or rendering.
CreateControlCollection (inherited from Control) Creates a new
ControlCollection object to hold the child controls (both literal and
server) of the server control.
EnsureChildControls (inherited from Control) Determines whether the
server control contains child controls. If it does not, it creates
child controls.
Finalize (inherited from Object) Overridden. Allows an Object to
attempt to free resources and perform other cleanup operations before
the Object is reclaimed by garbage collection.
In C# and C++, finalizers are expressed using destructor syntax.

IsLiteralContent (inherited from Control) Determines if the server
control holds only literal content.
LoadViewState (inherited from Control) Restores view-state information
from a previous page request that was saved by the SaveViewState
method.
MapPathSecure (inherited from Control) Retrieves the physical path that
a virtual path, either absolute or relative, maps to.
MemberwiseClone (inherited from Object) Creates a shallow copy of the
current Object.
OnBubbleEvent (inherited from Control) Determines whether the event for
the server control is passed up the page''s UI server control hierarchy.

OnDataBinding (inherited from Control) Raises the DataBinding event.
OnInit (inherited from Control) Raises the Init event.
OnLoad (inherited from Control) Raises the Load event.
OnPreRender (inherited from Control) Raises the PreRender event.
OnUnload (inherited from Control) Raises the Unload event.
Note Server controls should perform any final cleanup, such as
closing files, closing database connections, and discarding objects,
during this stage of the server control lifecycle.
RaiseBubbleEvent (inherited from Control) Assigns any sources of the
event and its information to the control''s parent.
RemovedControl (inherited from Control) Called after a control is
removed from the Controls collection of another control.
Render (inherited from Control) Sends server control content to a
provided HtmlTextWriter object, which writes the content to be rendered
on the client.
RenderChildren (inherited from Control) Outputs the content of a server
control''s children to a provided HtmlTextWriter object, which writes
the content to be rendered on the client.
SaveViewState (inherited from Control) Saves any server control
view-state changes that have occurred since the time the page was
posted back to the server.
TrackViewState (inherited from Control) Causes tracking of view-state
changes to the server control so they can be stored in the server
control''s StateBag object. This object is accessible through the
Control.ViewState property.

See Also
HtmlImage Class | System.Web.UI.HtmlControls Namespace | Web Namespaces
in Visual Studio | Managed Extensions for C++ Programming
Syntax based on .NET Framework version 1.1.
Documentation version 1.1.0.
--------------------------------------------------------------------------------

Send comments on this topic.

? 2001-2002 Microsoft Corporation. All rights reserved.




John wrote:

John wrote:
Here’’s what I hope is an under-simplified answer to your dillemma - don’’t
use ASP.NET?
Here''s what I hope is an under-simplified answer to your dillemma - don''t
use ASP.NET?




And in addition to that - dont post in this news group .. :) why

waste time here ? most people are visiting this group coz they have

already made up their mind and using asp.net at present



And in addition to that - dont post in this news group .. :) why
waste time here ? most people are visiting this group coz they have
already made up their mind and using asp.net at present


这篇关于由dumbo muppets构建的ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆