视觉工作室11 [英] visual studio 11

查看:86
本文介绍了视觉工作室11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

PreviousPage。 FindControl

PreviousPage.FindControl

错误:不包含'FindControl'的定义,并且没有扩展方法'FindControl'接受类型的第一个参数是你缺少一个assembely引用或using指令。

error : does not contain a definition for 'FindControl' and no extension method 'FindControl' accepting a first argument of type are you missing a assembely reference or using directive.

它是否有问题视觉工作室,我们使用vs 11

is it something wrong with the visual studio , we use vs 11

该应用程序较早,但有时会出现此错误。

the application was fine earlier but sometimes this error appears.

该应用程序可以正常使用以下代码和类似如上所述,页面给出了错误,

the application works fine with the following code and similar page gives error as explained above,

使用System;

使用System.Collections.Generic;

使用System.Linq;

使用System.Web;

使用System.Web.UI;

使用System.Web.UI.WebControls;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ControlValue:System.Web.UI.Page

{  ; protected void Page_Load(object sender,EventArgs e)

{         var textbox = PreviousPage.FindControl(" txtbxControl")as TextBox;         if(textbox!= null)         {            
lblControl.Text = textbox.Text;         }    

public partial class ControlValue : System.Web.UI.Page
{  protected void Page_Load(object sender, EventArgs e)
{         var textbox = PreviousPage.FindControl("txtbxControl") as TextBox;         if (textbox != null)         {             lblControl.Text = textbox.Text;         }     } }

问候

推荐答案

您好maverickproton,

Hi maverickproton,

我认为您的推荐信息未添加正确。

I think your references were not added correct.

请检查System.Web的参考。

Please check the reference of System.Web.

祝你好运,

自我


这篇关于视觉工作室11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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