简体   繁体   English

asp.net链接按钮在Web服务器中不起作用

[英]asp.net link button doesn't work in web server

I have a simple link button in my aspx page. 我的aspx页面中有一个简单的链接按钮。 everything works perfect, but once i upload my web forms to web server I have the following error for link button 一切正常,但是一旦我将Web表单上传到Web服务器,链接按钮就会出现以下错误

CS1061: 'ASP.ourproducts_aspx' does not contain a definition for 'btnShowBrandsDiv_Click' and no extension method 'btnShowBrandsDiv_Click' accepting a first argument of type 'ASP.ourproducts_aspx' could be found (are you missing a using directive or an assembly reference?)

i have a definition for my button in both .CS and .designer pages, or it won't work in my local machine this is my button 我在.CS和.designer页面中都有我的按钮的定义,否则在我的本地计算机上将不起作用,这是我的按钮

<asp:LinkButton runat="server" ID="btnShowBrandsDiv" OnClick="btnShowBrandsDiv_Click">Show</asp:LinkButton>

it maybe a very simple thing but i couldn't figure it out. 这也许是一件非常简单的事情,但我无法弄清楚。
thank you 谢谢

The server doesn't have an updated version of your DLL. 服务器没有DLL的更新版本。 Copy up your bin directory to your server and .NET will be able to find the definition. 将您的bin目录复制到服务器,.NET将能够找到该定义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM