Background declaration of user controls

xiaoxiao2021-03-06  14

Original text

http://dev.9cbs.net/develop/Article/26/26270.shtm

The authors declaration in the background when references the user control:

protected loginoutcontrol loginoutcontrol1;

There are also many articles on the Internet to write, but the running process is wrong.

Compiler error message: CS0117: "asp.webform1_aspx" does not include the definition of "loginoutControl1" error: line 263: #Line Default line 264: #Line Hidden line 265: this.loginoutcontrol1 = __ctrl; line 266: line 267 : #Line 22 "C: /inetpub/wwwroot/userControl/webform1.aspx" Source File: C: /Winnt/Microsoft.Net/framework/v1.1.4322/temporary ASP.NET FILES / USERCONTROL / 9FA4FC18 / 34E4D87 / 45Alkeqe. 0.cs line: -------------- 265 to be written as: logInOutControl uc = this.FindControl ( "logInOutControl1") as logInOutControl; uc.LogInOutClick = new LogInOutClickHandler (LogInOutControl1_LogInOutClick);

转载请注明原文地址:https://www.9cbs.com/read-67586.html

New Post(0)