本文介绍了FindControl无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我不确定我做错了什么。这是我的代码: 受保护的子页面_Load(ByVal发送者作为对象,ByVal e As System.EventArgs) 处理Me.Load Dim hyp As HyperLink = CType(Me.FindControl(" hypFilt"& Request.QueryString(" Filt")),HyperLink) 如果不是什么就没有呢 hyp.Font.Bold = True EndIf 结束如果 我在页面上有几个超链接控件。有些是ID = hypFiltA, hypFiltB,hypFiltC等。它们用于按字母表的第一个字母 过滤一些数据。代码运行,没有崩溃,但上面的代码永远不会发现它们。 hyp always = nothing。 " hypFilt" &安培; Request.QueryString(" Filt")确实评估了正确的 值。 谢谢, KeithI''m not sure what I''m doing wrong. Here''s my code:Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)Handles Me.LoadDim hyp As HyperLink = CType(Me.FindControl("hypFilt" &Request.QueryString("Filt")), HyperLink)If Not hyp Is Nothing Thenhyp.Font.Bold = TrueEndIfEnd IfI have several hyperlink controls on a page. Some are ID = hypFiltA,hypFiltB, hypFiltC, etc. They are used to filter some data by first letterof the alphabet. The code runs, nothing crashes but but the code above neverfinds them. hyp always = nothing."hypFilt" & Request.QueryString("Filt") does evaluate out to the correctvalue.Thanks,Keith推荐答案 System.EventArgs )System.EventArgs) 从不never letterletter 这篇关于FindControl无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!