3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Ramy Mahrous
0

I'm not sure what you mean. If you want to create a list from dynamic data or get data from a dynamic list?
From data to list...
<html><body><form>
<asp:ListBox ID="ListBox1" runat="server></asp:ListBox>
</form></body></html>

protected void page_load(object sender, EventArgs e)
{
// Defining DataSources is very large in scope but to get a list of roles that a user is a
//member of, assuming you have a role provider setup with asp...
ListBox1.DataSource = Roles.GetAllUserRoles(User.Identity.Name);
ListBox1.DataBind();
}

I assume you could bind a list box to any field in any table provided they are set up as a provider. I'm not really sure how to do it though, something about stored procedures?

From list to data...
First define your dynamic control(MSDN search for create dynamic controls).
The create a class that tests for the controls existance. If the control exist then convert its data to an array and work with it from there. Here is another discussion about this. http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.windowsforms/topic59930.aspx
Give us some more detail for a more detailed answer.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.