使用代码创建控件如何设置控件ID
如题
SqlDataSource conn = new SqlDataSource();
conn.ConnectionString = ConfigurationManager.ConnectionStrings[ "xinkepc_data "].ToString();
conn.ProviderName = ConfigurationManager.ConnectionStrings[ "xinkepc_data "].ProviderName;
conn.SelectCommand = "select * from ad ";
控件的ID该怎么设置呢
------解决方案--------------------conn.ID= "SqlDataSource1 ";