Hi all,
I'm reading user information from Active Directory. I'm allowing the users to search by username from a web form. There will be times when the result will be more than one record. What I'm trying to do is to generate radio buttons at run-time, so users can select the user account they are looking for, and then populate the information into a form.
My question is how do I create a single event handler for more than one radio button, so I can write the code to populate the information in the form controls.
here is the portion of the code where I want to create the radio buttons:
Any help is greatly appreciated
foreach (SearchResult result in search.FindAll( ))
{
if (result.Propert ies["samAccountName "].Count > 0 && result.Properti es["mail"].Count > 0 && result.Properti es["givenname"].Count > 0 && result.Properti es["sn"].Count > 0)
{
Response.Write( "<tr><td>" + result.Properti es["samAccountName "][0].ToString() + "</td><td>" + result.Properti es["mail"][0].ToString() + "</td><td>" + result.Properti es["givenname"][0].ToString() + "</td><td>" + result.Properti es["sn"][0].ToString() + "</td></tr>");
}
}
I'm reading user information from Active Directory. I'm allowing the users to search by username from a web form. There will be times when the result will be more than one record. What I'm trying to do is to generate radio buttons at run-time, so users can select the user account they are looking for, and then populate the information into a form.
My question is how do I create a single event handler for more than one radio button, so I can write the code to populate the information in the form controls.
here is the portion of the code where I want to create the radio buttons:
Any help is greatly appreciated
foreach (SearchResult result in search.FindAll( ))
{
if (result.Propert ies["samAccountName "].Count > 0 && result.Properti es["mail"].Count > 0 && result.Properti es["givenname"].Count > 0 && result.Properti es["sn"].Count > 0)
{
Response.Write( "<tr><td>" + result.Properti es["samAccountName "][0].ToString() + "</td><td>" + result.Properti es["mail"][0].ToString() + "</td><td>" + result.Properti es["givenname"][0].ToString() + "</td><td>" + result.Properti es["sn"][0].ToString() + "</td></tr>");
}
}
Comment