VB返回代码中的NullException错误 [英] Nullexception error in vb back code

查看:72
本文介绍了VB返回代码中的NullException错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我在此代码中加载了数据的listview时出错,数据在那里-不是空字符串或其他任何东西.有什么想法吗?

Hello,

I get an error in this code that loads a listview with data, and the data is there - not empty strings or anything. Any ideas?

Partial Class Blank
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
        Dim lbl1, lbl2, lbl3 As New Label()

        lbl1 = CType(ListView1.FindControl("OptLabel"), Label)
        TextBox1.Text = lbl1.Text <<<<<<<< nullexception error right here but there is data in the Listview

    End Sub


End Class

推荐答案

那可能是要走的路..任何指向示例代码的链接?

非常感谢您在这个主题上回复我-谢谢!

干杯,
DC
That might be the route to go .. any links to sample code?

And thanks much for getting back to me on this thread - appreciate!

Cheers,
DC


这篇关于VB返回代码中的NullException错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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