首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

“Attributes”不是“System.Web.UI.Control”的成员解决方案

2012-12-19 
“Attributes”不是“System.Web.UI.Control”的成员for i0 to sumrecord-1dim LinkButtonDatagrid1.Items(i

“Attributes”不是“System.Web.UI.Control”的成员
   for i=0 to sumrecord-1
   dim LinkButton=Datagrid1.Items(i).Cells(9).Controls(0)
   LinkButton.Attributes.Add("onclick","javascript:openwin('wy_yzwyh_mod.aspx?id=" & Datagrid1.Items(i).Cells(0).text & "')")next
cnn.close()

[最优解释]
“Attributes”不是“System.Web.UI.Control”的成员
已经很清楚了啊
[其他解释]
dim LinkButton as LinkButton
[其他解释]

引用:
“Attributes”不是“System.Web.UI.Control”的成员
已经很清楚了啊

dim lbtn as LinkButton=Datagrid1.Items(i).Cells(9).Controls(0)
  lbtn.Attributes.Add("onclick","javascript:openwin('wy_yzwyh_mod.aspx?id=" & Datagrid1.Items(i).Cells(0).text & "')")next
估计成吧


[其他解释]
引用:
for i=0 to sumrecord-1
  dim LinkButton=Datagrid1.Items(i).Cells(9).Controls(0)
  LinkButton.Attributes.Add("onclick","javascript:openwin('wy_yzwyh_mod.aspx?id=" & Datagrid1.Items(i).Cells(0).te……

要使用ctype函数指定类型。
[其他解释]
Datagrid1.Items(i).Cells(9).Controls(0)
不是LinkButton类型的吧,你监控一下是不是
Datagrid1.Items(i).Cells(9).Controls(1)

Datagrid1.Items(i).Cells(9).Controls(2)


[其他解释]
“Attributes”不是“System.Web.UI.Control”的成员
能不能告诉我这个怎么改,我是个初学者不懂,大家帮帮忙。

热点排行