|
playing with bugs ) wrote: Sorry but could you explain what is ldap ?
LDAP (Light weight directory access protocol) is a protocol for accessing directory services. Basically it is used by companies to keep employee information. Most of the big companies having LDAP servers. So if we are writing an application which works on companies intranet, instead of adding all the users to the application database, we can use LDAP server and authenticate the details.
|
|
|
|
|
Thanks Navneeth now got the proper direction to get right info
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
samerh wrote: Ho wcan i retreive firstname, lastname, email, department for active users from ldap using asp.net 2.0
thanks
Have you searched[^] ?
|
|
|
|
|
Actually i did and i wrote some thing but is generating an error
what i wrote is
<br />
Public Sub GetAllUsers()<br />
Dim sServerName As String = "mail"<br />
Dim oRoot As DirectoryEntry = New DirectoryEntry("LDAP://xxx.com")<br />
Dim oSearcher As DirectorySearcher = New DirectorySearcher(oRoot)<br />
Dim oResults As SearchResultCollection<br />
oSearcher.PropertiesToLoad.Add("mail")<br />
oSearcher.PropertiesToLoad.Add("givenname")<br />
oSearcher.PropertiesToLoad.Add("cn")<br />
oResults = oSearcher.FindAll<br />
For i As Integer = 0 To oResults.Count - 1<br />
If Not oResults(i).GetDirectoryEntry().Properties("mail").Value Is Nothing Then<br />
Response.Write(oResults(i).GetDirectoryEntry().Properties("cn").Value & "<br>")<br />
End If<br />
Next<br />
End Sub<br />
this function runs normaly for few users and i can get the values then it crashes. the error generated is "The specifies directory service attribute or value does not exist". it stops on the if statement beneath for loop.
Why is this error generating?
How can i filter so that only active users appears?
thanks
|
|
|
|
|
You should check whether this property is exist or not.
if(de.Properties.Contains("mail"))
Please try the link that I gave you.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
|
Hi,
I have a problem in java script when it is used with Master page.
I Try to find Control Id with
document.getElementById("TextBox1").value
but i can't get its value.
but if i use this statement without master page,it will working fine.
Can any one tell me how i will rectify my problem.
thanking u
Ajeet
|
|
|
|
|
While using the Master page,ASP.NET give client id at runtime .
Look at the view source of your page and check the id of textbox.
OR another better way is to send id from server to client while calling the javascript function
TextBox1.ClientId will give you client id
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
playing with bugs ) wrote: Look at the view source of your page and check the id of textbox
Not a clean approach. You could use something like document.getElementById('<%=TextBox1.ClientID %>') , so you don't need to worry about the name which is rendered. Your solution will make problem if someone changed the masterpage name.
|
|
|
|
|
Please read the post once again. I also mention the better approch.
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
playing with bugs ) wrote: Please read the post once again. I also mention the better approch.
Sorry, I missed that
|
|
|
|
|
document.getElementById('<%=TextBox1.ClientID %>').value will give you value of the textbox when your using Master page also
|
|
|
|
|
Thanks Sir
I got solution of my problem.
|
|
|
|
|
Hi to all!
In my aspx page i am having a calendar control,which represents attendance status(either present,absent or leave)of a student.My need is to add a check box at design time to each day of calender control.At runtime i want to check mark as needed.
pls provide me coding to add a check box .
SunithaNallana
|
|
|
|
|
SunithaNallana wrote: pls provide me coding to add a check box .
I really doubt whether this is possible for anyone in this forum with the information you provided. Why don't you google and find a Multi-Select Calender Control on the web which will absolutely save your coding time. But still you will have to spent some time exploring the properties and methods of the component to program it.
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hi!!
Pls let me know where do i lag behind providing the information.
i have done above said requirement dynamically(at run time) in dayRender event of calender control but that event is getting executed every time the page is loaded that too 30 times(as many number of days in month).So i am trying to add check boxes at design time itself to avoid this looping.
|
|
|
|
|
Are you using built-in ASP.NET Calender Control?
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Yes i have used built in calender control
|
|
|
|
|
Built-In calender control is not template control to add a checkBox or any child control. I don't think this is possible with that. I suggest you to create a your own Calender control with Datalist(Template Control) and CheckBox In the ItemTemplate of the DataList. The other person (Sun Ray) in the disscussion suggested the same.
Either you have to find a calender control on the web which servers your requirement (It's available, Once i worked on similar problem) or you have to write your own control. Apart from these I don't see any other feasible solution to your problem.
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hi,
rather using calander control you can create calander using datalist.
And then in itemTemplate of datalist you can add checkbox.
Now think and try to do it yr own way...
Best of Luck..
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
hi,
I confused with sql database connection state for SqlDataAdapter.Fill() method. SqlDataAdapter retrieve the data from database with closed connection with server exception "Invalid operation ..." but it won’t throw that exception. How it works?.. Plz clear my doubt.
friendly,
ranandbe
|
|
|
|
|
ranandbe wrote: I confused with sql database connection state for SqlDataAdapter.Fill() method
There's no need of any explicit open and close of the Database Connection when you use SQLDataAdapter. SQLDataAdapter will handle that for you. The DataAdapter will implicitly open the connection when it has to retrieve the Data and Close the connection Once it is done.
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Fill() method automatically open the connection and again disconnect after execution in case connection was not oper prior to execution of Fill() method, In case connection was open you will have close it manually.
|
|
|
|
|
Thanks for your information.
friendly,
ranandbe
|
|
|
|
|
since data adapter works with disconnected architecture....
data adaper opens and close connection automatically
Aswini
|
|
|
|