使用這個方法就可以更方便的搜尋需要的Controls
// 遞迴尋找控制項的方法
private Control FindControlByName(Control parentControl, string name)
{
if (parentControl.Name == name)
{
return parentControl;
}
foreach (Control childControl in parentControl.Controls)
{
Control targetControl = FindControlByName(childControl, name);
if (targetControl != null)
{
return targetControl;
}
}
return null;
}
![[03] v-slot ( slot, slot-scope )](https://static.coderbridge.com/img/m6fish/717a701f6d10407e9afe555bbfe717e9.jpg)
![[ CSS 02 ] 各種裝飾](https://static.coderbridge.com/images/covers/default-post-cover-2.jpg)
