0

I have a simple link button in my aspx page. everything works perfect, but once i upload my web forms to web server I have the following error for link button

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

<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

4
  • 1
    It looks like a deployment issue. How are you uploading your website to server? Commented Jul 10, 2014 at 20:50
  • maybe you are missing a dll file? Also is this a "website" or a "web application" project? Commented Jul 10, 2014 at 20:52
  • it's a web application. @Ehsan it's not me who uploads the site, what is the deployment issue could i have? thanks all Commented Jul 11, 2014 at 12:30
  • Are you publishing the website before deploying? or just copying all the files to server with code files? Commented Jul 12, 2014 at 8:56

1 Answer 1

1

The server doesn't have an updated version of your DLL. Copy up your bin directory to your server and .NET will be able to find the definition.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.