I'm creating a custom control in ASP.NET suing C#.NET
The control has a property say Drive, that shows the list of all drives in the property window.
If I select any drive from the "Drive" Property of that control then how can i map the selected Item in the code behind.
public List allDrives = new List();
Public List Drive
{
get
{
return allDrives;
}
set
{
allDrives = value;
}
}
Now, this property of my custom control helps to load the list of drives in the "Drive" property and shows all the list of drives as a collection.
If I select any drive then there is another property that loads the list of directories in the another property
in that selected drive.
Amit ChoudharyPosted Feb 14, 2011, 12:26 AM
Well in the index in the List Drives would be same as in the List if you are binding the List using Drive property.
So while you are selecting a value from Drive property, get the index of the selected drive and change the selected index of the list to the same index.
Hope it make sense to you.\
Thanks.