Last post Dec 31, 2020 12:16 PM by Schlauberger
Dec 31, 2020 03:08 AM|Schlauberger|LINK
I am new to ASP should be a simple solution that I am overlooking cannot seem to get my web form to fire an event? Double click on the button1 in design view nothing happens. Button Property Lightning view no joy. Attempt to manually enter code error is
generated at build.
<%@ Page Language="vb" AutoEventWireup="false" CodeBeind="TestPage.aspx.vb" Inherits="SampleSite.TestPage" %>
<form id="form1" runat="server">
<asp: Label id="Label1" runat="server" text="Type Something Here" />
<asp: TextBox id="TextBox1" runat="server"></asp:TextBox>
<asp: Button id="Button1" runat="server" Text="Button"/>
Partial Class WebForm 'Does not matter if I use Partial Public or Public
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
'Does not recognize Button1.Click or TextBox1.Text or Label1.Text generates an ERROR BC30506
Any assistance would be greatly appreciated using Visual Studio 2019 ASP Net Application Empty Web Site added web form with Project menu.
Dec 31, 2020 09:11 AM|XuDong Peng|LINK
According to your description, I create a simple demo to test your code. But I didn't get the same error. I'm not sure if you changed the control name or other code after building the project.
Have you checked that the control ID in the aspx page corresponds to the control in
You could also try to rebuild the project.
Hope this can help you.
Dec 31, 2020 12:16 PM|Schlauberger|LINK
Wow, deleted application created new and everything functions as expected. Curious shouldn't the VB Class file be displayed in the Solutions Explorer? Thanks for the response simple task but major hurdle.