(Joseph Croney (MSFT))
6/8/2002 12:30:00 AM
Hi Eric,
Here is a sample which runs through a string array and dynamically creates
mobile:link controls.
<script runat="server" language="c#">
private void Page_Load(object sender, System.EventArgs e)
{
// Array of Links
string[] LinksArray = new string[]
{"FirstLink.aspx","SecondLink.aspx"};
// Go through the array, dynamically create link controls
// and add them to the panel
foreach (string s in LinksArray)
{
Link myLink = new Link();
myLink.NavigateUrl = s;
myLink.Text = s;
Panel1.Controls.Add(myLink);
}
}
</script>
<mobile:Form id="Form1" runat="server">
<Mobile:Panel id="Panel1" runat="server"></Mobile:Panel>
</mobile:Form>
Hope this helps,
Joseph Croney
-----------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.