问题列表 - 第11362页

部署时ASP.net CS1061编译错误

我在这里有点痛苦,我无法弄清楚出了什么问题.

我有一个ASP.net项目,我部署在服务器上.起初一切似乎都很好,没有任何错误.但是,作为最后一个加法,我想将搜索功能添加到一个相当大的列表中,所以我在标记中添加了以下语法:

<td>
    Search Server:
    <asp:TextBox ID="txtSearch" runat="server" />
    <asp:Button ID="btnLookup" runat="server" OnClick="btnLookup_Clicked" Text="Search" />
    <asp:Label ID="lblFeedback" runat="server" />
</td>
Run Code Online (Sandbox Code Playgroud)

以及后面的代码:

protected void btnLookup_Clicked(object sender, EventArgs e)
{
    lblFeedback.Text = "";
    Session["IsSearch"] = true;
    LoadServerList();
}
Run Code Online (Sandbox Code Playgroud)

当我在本地运行它时,它可以正常工作.然而!

当我将这些文件复制到服务器时,我收到编译错误:

编译器错误消息:CS1061:'ASP.ntservice_ reports_ reports_ serverlist_ manage_aspx'不包含'btnLookup_ Clicked'的定义,并且没有扩展方法'btnLookup_ Clicked'接受类型'ASP.ntservice_ reports_ reports_server_serverlist_ manage_aspxx'的第一个参数可以找到(你错过了使用指令或程序集引用吗?)

它说没有什么可以处理我的Clicked事件,虽然它在我通过Visual Studio运行时确实有效.

有任何想法吗?

编辑:我自己尝试的是

  • 重命名按钮
  • 删除和读取按钮
  • 通过设计师添加
  • 重命名单击事件
  • 从标记中删除事件允许正常执行...:/

c# asp.net iis

8
推荐指数
1
解决办法
5万
查看次数

如何更新sql server中的前100条记录

我想更新SQL Server中的前100条记录.我有一个表T1包含字段F1F2.T1有200条记录.我想更新F1前100条记录中的字段.如何TOP 100在SQL Server中进行更新?

sql t-sql sql-server sql-update

376
推荐指数
4
解决办法
38万
查看次数

Objective-C 运行时中类似 IBOutlet 的构造

我对 IBOutlets 的理解是它们充当了 Objective-C 类中的变量和属性的标记。Objective-C 运行时中是否有任何内容可以让人们在运行时查询 ivar 或属性或类是否已用 IBOutlet 标记?或者 XCode 只是在编译时对这些做了一些聪明的事情?

如果它们是运行时构造,是否可以定义自己的标记并以这种方式使用它们:

@private
    MyMarker MyClass instance;
Run Code Online (Sandbox Code Playgroud)

objective-c objective-c-runtime

2
推荐指数
1
解决办法
777
查看次数

Action Script 3中有类似printf的东西吗?

我搜索了一会儿但没有在Action Script中找到类似printf的东西.

这使得生成格式化字符串变得有点困难.

actionscript-3

12
推荐指数
2
解决办法
9795
查看次数

什么是https和SSL?他们是如何工作的?它们如何在PHP中使用?

我知道一般的定义,但我需要更多关于如何一般地实现它们的细节和特定的PHP,以及我从中获得的功能究竟是什么?

php security ssl https implementation

5
推荐指数
2
解决办法
510
查看次数

C#:缩短代码(Nullable Object,Return Property或String.Empty)

我想知道是否有人可以为此代码提出缩短版本:

MyObject theObject = ObjectCollection.GrabAnObject();
if (theObject == null) return String.Empty;
else return theObject.myProperty;
Run Code Online (Sandbox Code Playgroud)

谢谢!

c#

0
推荐指数
1
解决办法
512
查看次数

ssh命令执行不考虑.bashrc | .bash_login | 的.ssh/RC?

我试图通过ssh远程执行命令,例如:

ssh <user>@<host> <command>
Run Code Online (Sandbox Code Playgroud)

需要执行的命令是别名,在.bashrc中定义,例如

alias ll='ls -al'
Run Code Online (Sandbox Code Playgroud)

那么到底应该执行以下命令:

ssh user@host "ll"
Run Code Online (Sandbox Code Playgroud)

我已经发现.bashrc只能获得交互式shell,所以在.bash_login中我放了:

if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi
Run Code Online (Sandbox Code Playgroud)

我还尝试直接在.bash_login中定义别名.

我还尝试将.bashrc的别名定义/源代码放在.bash_profile中,也放在.ssh/rc中.但这没有任何作用.请注意,我无法更改ssh命令的调用方式,因为这是某些二进制安装脚本的一部分.我唯一能修改的就是环境.执行ssh命令时是否还有其他可能来源这个别名?是否有一些ssh配置需要调整?

ssh bash

48
推荐指数
3
解决办法
4万
查看次数

删除sql server中的数据库

我需要删除名称以"In"开头的数据库...

我试过"喜欢",但却抛出语法错误......

我尝试了以下命令,但为"name"抛出了语法错误

SELECT'DROP DATABASE'+ name +';' 来自sys.databases,其名称如'In%'

sql-server sql-server-2008

1
推荐指数
1
解决办法
5583
查看次数

使用方法类型生成类的方法列表

我想生成一个类或类目录中的所有方法的列表.我还需要他们的返回类型.将它输出到文本文件将会...有没有人知道一个工具,加入VS或什么会做任务?我顺便使用C#代码和Visual Studio 2008作为IDE

c# methods class

16
推荐指数
1
解决办法
3万
查看次数

foreach相当于jquery中的php?

在PHP中是否存在JQuery中的foreach代码?我在php中有一个代码,比如

<?php foreach ($viewfields as $viewfield): ?>       
if("<?php echo $viewfield['Attribute']['required'];?>"=='true'){
       $("<span class='req'><em> * </em></span>").appendTo("#fb_contentarea_col1down21 #label<?php echo $viewfield['Attribute']['sequence_no']?>");
   }


   if(<?=$viewfield['Attribute']['type'];?>=='text'||<?=$viewfield['Attribute']['type'];?>=='date'||<?=$viewfield['Attribute']['type'];?>=='number'){ 
       $("<input id=input<?=$viewfield['Attribute']['sequence_no'];?> type= 'text' style= 'width:<?=$viewfield['Attribute']['size'];?>px' data-attr=<?=$viewfield['Attribute']['type'];?> ></input><br>").appendTo("#fb_contentarea_col1down21 #<?=$viewfield['Attribute']['sequence_no'];?>");
   }


   else if(<?=$viewfield['Attribute']['type'];?>=='textarea'){
       $("<textarea style= 'width:<?=$viewfield['Attribute']['size'];?>px' data-attr=<?=$viewfield['Attribute']['type'];?> id=input<?=$viewfield['Attribute']['sequence_no'];?>></textarea><br>").appendTo("#fb_contentarea_col1down21 #<?=$viewfield['Attribute']['sequence_no'];?>");
}
Run Code Online (Sandbox Code Playgroud)

在Jquery中有没有相当于foreach的东西?如何在jQuery中实现相同的功能?

编辑1:

我认为它有效,但我得到一个错误.代码和错误消息如下.

for(<?=$viewfield;?> in <?=$viewfields;?>){

 if("<?=$viewfield['Attribute']['required'];?>"=='true'){
            $("<span class='req'><em> * </em></span>").appendTo("#fb_contentarea_col1down21 #label<?php echo $viewfield['Attribute']['sequence_no']?>");
 }

 if(<?=$viewfield['Attribute']['type'];?>=='text'||<?=$viewfield['Attribute']['type'];?>=='date'||<?=$viewfield['Attribute']['type'];?>=='number'){ 
            $("<input id=input<?=$viewfield['Attribute']['sequence_no'];?> type= 'text' style= 'width:<?=$viewfield['Attribute']['size'];?>px' data-attr=<?=$viewfield['Attribute']['type'];?> ></input><br>").appendTo("#fb_contentarea_col1down21 #<?=$viewfield['Attribute']['sequence_no'];?>");
 }

 else if(<?=$viewfield['Attribute']['type'];?>=='textarea'){
            $("<textarea style= 'width:<?=$viewfield['Attribute']['size'];?>px' data-attr=<?=$viewfield['Attribute']['type'];?> id=input<?=$viewfield['Attribute']['sequence_no'];?>></textarea><br>").appendTo("#fb_contentarea_col1down21 #<?=$viewfield['Attribute']['sequence_no'];?>");
 }
Run Code Online (Sandbox Code Playgroud)

}

错误信息:

(在数组中)的语法错误

有人能帮我吗..

php foreach jquery

14
推荐指数
4
解决办法
3万
查看次数