add usercontrol runtime


ถ้าจะทำการ add user control ตอน runtime ให้กับ user control อีกตัวทำอย่างไร

protected override void Render(HtmlTextWriter writer)
{
base.Controls.Add(LoadControl(“../uscSPCalendar.ascx”));
base.Render(writer);
}

http://support.microsoft.com/kb/317515
http://9keng.wordpress.com/2007/02/21/การค้นหา-control-โดยเมทธอด-findcontrol/

Advertisements
1 comment
  1. http://support.microsoft.com/kb/317515

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: