Jason W
Jason W

Reputation: 738

Enable/Disable button

I am working on a project where if someone is "on call" then the button to remove that individual needs to be disabled. I understand that I need to do something like

button.Enabled = false

However, I am having problems accessing my button in my VB.NET code. I can access other buttons, but not this particular one.

In my aspx code the code for the button is:

<asp:Button ID="btnRemove" runat="server" Text="Remove" />

When I try to do btnRemove.Enabled it isn't shown on the options with Intellisense, and basically isn't recognized. I thought that having the runat="server" was sufficient to get access to it. Any ideas of what I could be doing wrong?

Upvotes: 0

Views: 158

Answers (1)

Ala
Ala

Reputation: 1503

Try the following steps:

  1. Right click on yourFile.aspx.designer.vb and select delete.

  2. Right click on yourFile.aspx and select (Convert to Web Application).

  3. Click OK to the pop-up message that will appear.

Upvotes: 1

Related Questions