在asp.net中使用委托 [英] Using delegate in asp.net

查看:77
本文介绍了在asp.net中使用委托的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我需要asp.net(VB)的委托示例来在我的网页上显示数据.
Thx

Hi,
I need example of delegate for asp.net(VB) for showing data on my web page.
Thx

推荐答案

以下链接对您编写任何类型的委托都是有用的.

代表的初学者指南 [代表和事件-未经审查的故事-第1部分 [事件和代理简化了 [
Following links will be useful to you to write any kind of delegates.

A Beginner''s Guide to Delegates[^]

Delegates And Events - The Uncensored Story - Part 1[^]

Events and Delegates simplified[^]

Hope this will help!


使用System;
使用System.Data;
使用System.Configuration;
使用System.Collections;
使用System.Web;
使用System.Web.Security;
使用System.Web.UI;
使用System.Web.UI.WebControls;
使用System.Web.UI.WebControls.WebParts;
使用System.Web.UI.HtmlControls;
公共局部类标题:System.Web.UI.UserControl
{
公共事件ColorChangedEventHandler ColorChanged;
公共事件LinkClickEventHandler单击;
字符串_texts;
字符串_text;
公共无效Page_Init(对象发送者,EventArgs e)
{
//连接EventHandler
this.colorList.SelectedIndexChanged + =新的System.EventHandler(Index_Changed);
如果(_texts.IndexOf(''
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Header : System.Web.UI.UserControl
{
public event ColorChangedEventHandler ColorChanged;
public event LinkClickEventHandler Clicked;
string _texts;
string _text;
public void Page_Init(object sender, EventArgs e)
{
//Wire-up the EventHandler
this.colorList.SelectedIndexChanged += new System.EventHandler(Index_Changed);
if (_texts.IndexOf(''


'')> 0)
{
字符串[]文本= _texts.Split(''
'') > 0)
{
string[] Texts = _texts.Split(''


这篇关于在asp.net中使用委托的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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