Click here to Skip to main content
15,913,254 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionunable to use .test AJAX controls Pin
AprNgp24-Nov-08 22:30
AprNgp24-Nov-08 22:30 
AnswerRe: unable to use .test AJAX controls Pin
simsen25-Nov-08 0:02
simsen25-Nov-08 0:02 
AnswerRe: unable to use .test AJAX controls Pin
Abhijit Jana25-Nov-08 1:54
professionalAbhijit Jana25-Nov-08 1:54 
GeneralRe: unable to use .test AJAX controls Pin
AprNgp25-Nov-08 5:08
AprNgp25-Nov-08 5:08 
QuestionXML File Search from ASP.NET page Pin
codingrocks24-Nov-08 22:21
codingrocks24-Nov-08 22:21 
AnswerRe: XML File Search from ASP.NET page Pin
Nishant Singh24-Nov-08 23:47
Nishant Singh24-Nov-08 23:47 
GeneralXML File Search from ASP.NET page Pin
codingrocks26-Nov-08 16:42
codingrocks26-Nov-08 16:42 
QuestionClosing child window Pin
Subulakshmi Karthic24-Nov-08 22:15
Subulakshmi Karthic24-Nov-08 22:15 
AnswerRe: Closing child window Pin
Nishant Singh24-Nov-08 22:37
Nishant Singh24-Nov-08 22:37 
QuestionRe: Closing child window Pin
Subulakshmi Karthic24-Nov-08 22:41
Subulakshmi Karthic24-Nov-08 22:41 
AnswerRe: Closing child window Pin
Nishant Singh24-Nov-08 23:28
Nishant Singh24-Nov-08 23:28 
QuestionRe: Closing child window Pin
Subulakshmi Karthic24-Nov-08 23:55
Subulakshmi Karthic24-Nov-08 23:55 
QuestionHitcounter problem...please guide.. Pin
mr_muskurahat24-Nov-08 21:39
mr_muskurahat24-Nov-08 21:39 
AnswerRe: Hitcounter problem...please guide.. Pin
Christian Graus24-Nov-08 22:40
protectorChristian Graus24-Nov-08 22:40 
GeneralRe: Hitcounter problem...please guide.. Pin
mr_muskurahat24-Nov-08 23:33
mr_muskurahat24-Nov-08 23:33 
Question[Message Deleted] Pin
shanthi jothi24-Nov-08 21:32
shanthi jothi24-Nov-08 21:32 
AnswerRe: Generate Payslip Pin
Krazy Programmer25-Nov-08 1:21
Krazy Programmer25-Nov-08 1:21 
AnswerRe: Generate Payslip Pin
Abhijit Jana25-Nov-08 1:51
professionalAbhijit Jana25-Nov-08 1:51 
Questioncreating ssis package using C#.net Pin
l.laxmikant24-Nov-08 20:57
l.laxmikant24-Nov-08 20:57 
QuestionHow to find group of single user from active directory.?? Pin
Piyush Vardhan Singh24-Nov-08 20:22
Piyush Vardhan Singh24-Nov-08 20:22 
AnswerRe: How to find group of single user from active directory.?? Pin
Christian Graus24-Nov-08 20:33
protectorChristian Graus24-Nov-08 20:33 
GeneralRe: How to find group of single user from active directory.?? Pin
Piyush Vardhan Singh24-Nov-08 21:19
Piyush Vardhan Singh24-Nov-08 21:19 
Answer:-Rose | [Rose]


Private Function GetGroups(ByVal _path As String, ByVal _
username As String, ByVal password As String) As String
Dim GroupString As String
Dim myDE As New System.DirectoryServices.DirectoryEntry(_path, _
username, password)

Dim mySearcher As New DirectorySearcher(myDE)

mySearcher.Filter = "sAMAccountName=" & username
mySearcher.PropertiesToLoad.Add("memberOf")
Dim propertyCount As Integer

Try

Dim myresult As SearchResult = mySearcher.FindOne()
propertyCount = myresult.Properties("memberOf").Count

Dim dn As String
Dim equalsIndex, commaIndex As String

For i As Integer = 0 To propertyCount - 1
dn = myresult.Properties("memberOf")(i)
equalsIndex = dn.IndexOf("=", 1)
commaIndex = dn.IndexOf(",", 1)
If equalsIndex = -1 Then
Return Nothing
End If

GroupString += dn.Substring((equalsIndex + 1), _
(commaIndex - equalsIndex) - 1) & "/"

Next
Return GroupString

Catch ex As Exception
If ex.GetType Is GetType(System.NullReferenceException) Then


'they are still a good user just does not
'have a "memberOf" attribute so it errors out.
'code to do something else here if you want
Else

End If
End Try

End Function

Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com



QuestionShow checkbox inside a dropdownlist Pin
SreejithAchutan24-Nov-08 19:30
SreejithAchutan24-Nov-08 19:30 
AnswerRe: Show checkbox inside a dropdownlist Pin
Christian Graus24-Nov-08 19:34
protectorChristian Graus24-Nov-08 19:34 
AnswerRe: Show checkbox inside a dropdownlist Pin
Abhijit Jana24-Nov-08 19:34
professionalAbhijit Jana24-Nov-08 19:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.