程序实现的是根据db.CheckType(Session("UserName"))检查权限返回的Boolean来提供是否有超连接存在。现在db.CheckType(Session("UserName"))返回的是正确的,但是数据并不显示有超连接存在
'检查服务的权限,判断是否提供回复短信功能
Private Sub Repeater1_ItemCommand(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles Repeater1.ItemCommand
If e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType = ListItemType.Item Then
Dim StrMobile As String = CType(e.Item.FindControl("Mobile_Str"), Label).Text
If db.CheckType(Session("UserName")) Then
StrMobile = "<a href='Send.aspx?Id=" & StrMobile & " target='_blank'>" & StrMobile & "</a>"
Else
StrMobile = StrMobile
End If
CType(e.Item.FindControl("Mobile_Str"), Label).Text = StrMobile
End If
End Sub
html中
。。
<td align="center"><asp:Label ID="Mobile_Str" runat=server text='<%# DataBinder.Eval(Container.DataItem,"Mobile") %>'></asp:label></td>
。。
'检查服务的权限,判断是否提供回复短信功能
Private Sub Repeater1_ItemCommand(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles Repeater1.ItemCommand
If e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType = ListItemType.Item Then
Dim StrMobile As String = CType(e.Item.FindControl("Mobile_Str"), Label).Text
If db.CheckType(Session("UserName")) Then
StrMobile = "<a href='Send.aspx?Id=" & StrMobile & " target='_blank'>" & StrMobile & "</a>"
Else
StrMobile = StrMobile
End If
CType(e.Item.FindControl("Mobile_Str"), Label).Text = StrMobile
End If
End Sub
html中
。。
<td align="center"><asp:Label ID="Mobile_Str" runat=server text='<%# DataBinder.Eval(Container.DataItem,"Mobile") %>'></asp:label></td>
。。
解决方案 »
- 关于多线程,大家是否能给一个小例子,把线程的几个状态结合起来!
- 网站有多种语言问题,如何实现
- 关于Gridview中命令列删除按钮添加确认框的问题
- 提交内容中的<及>号替换后如何显示图片呢
- 给MediaPlay传递参数的简单问题?
- 哪位能提供vs.net 2003 MSDN的下载地址,非常感谢
- asp.net连access数据库的路径怎么写??
- 自定义控件中文乱码问题
- 通过ip地址怎么样获得用户所在的地区,包括省市区级
- 菜鸟问题:请教asp.net中从一页转到另一页的方法??
- 紧急求助关于asp.net程序间歇性不能访问的问题
- 在一个页面上建一个datagrid表不做任何数据库连接,但又可以浏览出表头来?
这样获得的strign不是对text属性的引用啊,而是一个独自的变量,怎么可能改正呢?
Dim StrMobile As Label= CType(e.Item.FindControl("Mobile_Str"), Label);
先获得这个label,然后在修改它的text属性应该就没有问题了