PlaceHolder control in .NET

xiaoxiao2021-03-06  39

I have recently been paying attention to someone asking, what is used by the PlaceHolder control in NET. In fact, the PlaceHolder control is used to dynamically load user-defined controls, such as

Private void Page_load (Object Sender,

System.Eventargs E)

{

String p = request.QueryString.get ("p");

PlaceHolder1.controls.clear ();

IF (p == NULL)

PlaceHolder1.controls.add (loadingControl

("Modules /" "Default" ".ascx"));

Else

{

PlaceHolder1.controls.add (loadingControl

("Modules /" P ".ascx"));

}

}

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

New Post(0)