If you need to get the last time that content was modified in a SharePoint site there is a SPSite and SPWeb property to get that information.
SPSite thisSite = new SPSite();
DateTime.FromFileTime(thisSite.LastContentModifiedDate.ToFileTimeUtc());
This can be helpful in writing a web part or code for displaying site in a web application not modified in a specified time.
Happy Coding!
c3d82121-2682-49a3-9fb2-d100e087cfa1|0|.0
If you are using sorting and paging in a SPGridView needing to persist the ViewState can be necessary on postback. I created a custom SPMenuField where cliient side scripts would change an SPListItem. The menu column needed to update based on the changes to stay accurate. If a custom sort had been performed once posted back the default sort would apply. On the onclientscriptclick method after your first javascript method include:
"javascript:__doPostBack('" + SPGridView.ClientID + "', '');";
Utilizing this method performs a postback and tells the system the SPGridView that sent the postback and keeping the ViewState intact and updating the custom menus with required changes.
fd8f6b85-a311-4f3e-a765-df456b1a4b66|0|.0
I switched hosting provider recently. Finally, have direct access to the sql server and a way better web interface than provided by Godaddy. Godaddy pages are so cluttered and full of adds it is barely navigable. I didn't think about it until after switching but the SoftSys Hosting web site is alot easier to navigate and get what you need done.
One of the primary reasons I switched was because of the recent 4GH hosting conversion only half of my sites were copied and the other half never moved. When I called Godaddy they said they would get it resolved within 72 hours. Their resolution was to copy my site to a restore folder which still left half of my web sites down. It took 72 hours to restore my files to another folder, which was unreasonable. After 7 years I have finally cancelled my hosting with Godaddy.
SoftSys Hosting has been great with customer service. All of my questions have been responded to within 10-15 minutes online. I was shocked, normally I would be on hold with Godaddy for 15 minutes before I would get a someone on the phone.
Anyways, If your looking for a reasonable priced hosting provider with great customer service I would definitly recommend SoftSys Hosting.
5659fd22-1ad4-4085-afb7-f161968c63d8|0|.0
So I had a task to get the members of a Exchange distribution list. What I ran into was lists members was another list and just kept going. So the solution I found was recursion. This is the best way to go through a group and ensure that each itam is found. Here is the code that I used to make that work.
On Error Resume Next
DLname = InputBox("Please enter Distribution List Name.")
GetMembership GetObject("LDAP://CN=" & DLname & ",OU=,OU=,dc=,dc=")
wscript.echo "Done!"
'Recursive Group member query
Sub GetMembership(objGroup)
On Error Resume Next
For Each objUser in objGroup.members
GroupType = Split(objUser.objectCategory,",")
If GroupType(0) = "CN=Group" Then
GetMembership GetObject("LDAP://" & objUser.name & "," & "OU=,OU=,dc=,dc=")
If Err.Number <> 0 Then
wscript.echo objUser.name & ", " & objGroup.CN & " , " & Err.Number
Err.Clear
End If
Elseif GroupType(0) = "CN=Person" Then
wscript.echo objUser.mail & "," & objUser.title
End If
Next
End Sub
So the most important thing is that initially calling the sub GetMembership and if the object is a group it recalls the sub again. This allows it to go through every group and get the users for the current group and sub group.
5a76fb58-bdf3-40f6-8f5e-b31ea76ad80c|0|.0