Zero Dai - MSFT
Dear dub_beat,
Yes, we can use SqlDataSource, but we cannot use it if we drag it onto a web form directly, since SqlDataSource control from tool box is a non-mobile control, which is permitted only inside templates. So, you need to add a device filter for your mobile control and edit its template, then you can drag non-mobile onto this template.
The root cause of your problem is that your mobile control list cannot access sqldatasource.
When you take a look into html of a web form, all the prefix of controls has been set to "mobile", so control with prefix "asp:" cannot be recognized.
Also, we still can use it with writing our code in back codefile. You can use sqldatasource as following:
------------------------------------------------------------------------------------
SqlDataSource datasource = new SqlDataSource();
datasource.ConnectionString
= ConfigurationManager.ConnectionStrings["DatabaseConnectionString1"].ToString();
datasource.SelectCommand = "select UserName from UserInfo";
datasource.SelectCommandType = SqlDataSourceCommandType.Text;
datasource.Select(new DataSourceSelectArguments());
this.ObjectList1.AutoGenerateFields = true;
this.ObjectList1.DataSource = datasource;
this.ObjectList1.DataBind();
------------------------------------------------------------------------------------
Regards,
Zero Dai - MSFT