- Copy the .gif file that you want to use for the icon to the following folder on the server, as appropriate for your version of SharePoint: SharePoint Portal Server 2003 - Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\Template\ImagesSharePoint Server 2007- Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\ImageSharePoint Server 2010 - Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\14\Template\Images
- Stop IIS at a command prompt by running IISReset /stop
- Edit the Docicon.xml file to include the .pdf extension. To do this, follow these steps:
- Start Notepad, and then open the Docicon.xml file. The Docicon.xml file is located in one of the following folders on the server: SharePoint Portal Server 2003 - Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\60\Template\XmlSharePoint Server 2007- Drive :\Program Files\Common Files\Microsoft Shared\Web server extensions\12\Template\XmlSharePoint Server 2010- Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\14\Template\Xml
- Add an entry for the .pdf extension. For example, add a line that is similar to the following to the Docicon.xml file, where NameofIconFile is the name of the .gif file: <Mapping Key="pdf" Value="NameofIconFile.gif"/>
- On the File menu, click Save, and then quit Notepad.
- Start Notepad, and then open the Docicon.xml file. The Docicon.xml file is located in one of the following folders on the server:
- Start IIS at a command prompt by running IISReset /start
Wednesday, 27 July 2011
Display / Show PDF icon in Sharepoint / MOSS
Thursday, 21 July 2011
Calculate Working days in a Month
Dim stDate As Date = New Date(Year(dtDate), Month(dtDate), 1)
Dim enDate As Date = New Date(Year(stDate), Month(stDate), DateTime.DaysInMonth(Year(stDate), Month(stDate)))
While stDate < enDate
If stDate.DayOfWeek <> DayOfWeek.Saturday AndAlso stDate.DayOfWeek <> DayOfWeek.Sunday Then
intReturnValue += 1
End If
stDate = stDate.AddDays(1)
End While
Return intReturnValue
Dim enDate As Date = New Date(Year(stDate), Month(stDate), DateTime.DaysInMonth(Year(stDate), Month(stDate)))
While stDate < enDate
If stDate.DayOfWeek <> DayOfWeek.Saturday AndAlso stDate.DayOfWeek <> DayOfWeek.Sunday Then
intReturnValue += 1
End If
stDate = stDate.AddDays(1)
End While
Return intReturnValue
Wednesday, 20 July 2011
How to create threads with .net and Azure Web Role
Dim t As New Threading.Thread(AddressOf ThreadTask)
t.IsBackground = True
t.Start()
and then create your ThreadTask
Private Sub ThreadTask()
'do your routine here
End Sub
t.IsBackground = True
t.Start()
and then create your ThreadTask
Private Sub ThreadTask()
'do your routine here
End Sub
Monday, 18 July 2011
Best way to Zoom map to include all Pushpins
add the following to your map function
var locs = new Array();
/* Repeat the next 2 lines of code as neccessary */
var loc = new VELatLong(<latitude>, <longitude>);
locs.push(loc);
/* End Repeat */
map.SetMapView(locs);
var locs = new Array();
/* Repeat the next 2 lines of code as neccessary */
var loc = new VELatLong(<latitude>, <longitude>);
locs.push(loc);
/* End Repeat */
map.SetMapView(locs);
Writing to Azure Local Storage
You will need to modify ServiceDefinition.csdef add the following lines
<LocalResources>
<LocalStorage name="LocalTempFolder" cleanOnRoleRecycle="false" sizeInMB="5" />
</LocalResources>
and then you can access the path this way in your code
Dim localResource As LocalResource = RoleEnvironment.GetLocalResource("LocalTempFolder")
Dim pathToReadWriteFolder = localResource.RootPath
<LocalResources>
<LocalStorage name="LocalTempFolder" cleanOnRoleRecycle="false" sizeInMB="5" />
</LocalResources>
and then you can access the path this way in your code
Dim localResource As LocalResource = RoleEnvironment.GetLocalResource("LocalTempFolder")
Dim pathToReadWriteFolder = localResource.RootPath
Thursday, 14 July 2011
Check if SQL View Exist
IF OBJECT_ID ('_YOUR_VIEW_NAME', 'V') IS NOT NULL DROP VIEW _YOUR_VIEW_NAME';
Wednesday, 13 July 2011
Javascript Popup window causes parent font size increase?
If you are usnig Javascript popup window and its disturbing your parent font sizes use the ScriptManager.RegisterStartupScript instead.
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "newWindow", "window.open('MyPage.aspx?ID=" + MyID + "','_blank','status=1,toolbar=0,menubar=0,location=1,scrollbars=1,resizable=1,width=30,height=30');", true);
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "newWindow", "window.open('MyPage.aspx?ID=" + MyID + "','_blank','status=1,toolbar=0,menubar=0,location=1,scrollbars=1,resizable=1,width=30,height=30');", true);
Labels:
.Net,
Azure,
Javascript,
Popup,
Programmatically,
Window
Subscribe to:
Posts (Atom)