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

问题描述

如何在按钮上访问数据列表DataListCommandEventArgs单击

how to access data list DataListCommandEventArgs on button click

推荐答案

void mySource_Event(object sender, EventArgs e)
   {
   MyEventArgs args = e as MyEventArgs;
   if (args != null)
      {
      // You can use args here.
      }
   }

在VB中可能是这样的:

In VB is would be something like:

Private Sub mySource_Event(sender As Object, e As EventArgs) Handles ...
    Dim args As MyEventArgs = TryCast(e, MyEventArgs)
    If args IsNot Nothing Then
        ' You can use args here.
    End If
End Sub


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

09-13 10:05