UserControls与事件鼓泡 [英] UserControls With Event Bubling

查看:65
本文介绍了UserControls与事件鼓泡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,大家早上好...



开发一个登录控件,包括用户名文本,密码文本框和按钮(提交)。

设计必须在用户控件中,编码必须在你继承用户控件的页面中。

使用事件冒泡编码..



那是我的任务....这里我开发了一个带有要求的用户控制页面,但是我不能通过使用EVENT BUBBLING机制来尝试编写业务逻辑代码。 div class =h2_lin>解决方案

参见[ ^ ]有关ASP.NET中事件冒泡和UserControl继承的详细讨论。并且:[ ^ ]。



对于up event bubbling在JavaScript中,请参阅:[ ^ ]。



创建实例时对于UserControl,UserControl实例是一个基于其代码定义的动态实体:说UserControl继承其代码定义并没有多大意义,就像你不会说建筑继承一样它的蓝图。



如果您创建UserControl定义,然后创建另一个继承自它的UserControl定义,您可能会认为这是一组使用/的蓝图参考另一组蓝图。



我建议你在这个任务中使用事件冒泡来询问你的导师澄清他们的意思:问他们是否意味着什么更多而不只是在一些包含登录对话框的实体中定义了事件处理程序。


hi friends good morning to all...

"develop a login Control which consists of User name text, Password Textbox & button (Submit).
Design must be in User Control & Coding must be in Page which u have inherited user control.
By Using Event bubbling coding..

That is my Task....here i develop a usercontrol page with requirement but iam not able to write the bussiness logic code by using the EVENT BUBBLING Mechanism pleas try to me frnds......

解决方案

See [^] for a good discussion of event-bubbling and UserControl inheritance in ASP.NET. And: [^].

For "up event bubbling" in JavaScript, see: [^].

When you create an instance of a UserControl, the UserControl instance is a dynamic entity based on its code definition: it doesn't quite make sense to say that the UserControl "inherits" its code definition, just as you wouldn't say a building "inherits" its blueprints.

If you create a UserControl definition, and then create another UserControl definition that inherits from it, you might imagine this as being one set of blueprints that uses/references another set of blueprints.

I suggest you ask your instructor for clarification of what they mean by using "event bubbling" in this assignment: ask if they mean something more than just having Event Handlers defined in some containing entity that holds the log-in dialog.


这篇关于UserControls与事件鼓泡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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