Hi Team
If you have an error when creating a web form, error "Compiler Error Message: CS1061: 'default_aspx' does not contain a definition for 'btnStart_Click' and no accessible extension method 'btnStart_Click' accepting a first argument of type 'default_aspx' could be found (are you missing a using directive or an assembly reference?)
-
- <asp:Button ID="btnStart" runat="server" OnClick="btnStart_Click" />
- <asp:TextBox ID="SomeText" runat="server"></asp:TextBox>
-
- string results;
- private async void btnStart_Click(object sender, EventArgs e)
- {
- SaySomething();
- SomeText.Text = results;
- }
-
- async System.Threading.Tasks.Task<string> SaySomething()
- {
- await System.Threading.Tasks.Task.Delay(1000);
- results = "Hello result";
- return results;
- }