Monday, December 21, 2009

Redirect from a Page(Document Library) to any custom location in MOSS 2007

There was a requirement to redirect a user when (s)he clicks on a Document Library link from Quick Launch to a Shared Network Location, where the actual documents would reside. This was achieved in the following way.
Go to Site Actions ->Edit Page(of the document library in this case). Click Add a Web Part. In the Dialog Box that appears, pick Content Editor Web Part and click Ok. Click on Open the tool pane and click on the Source Editor button, add the following code to the Source Editor window.
<meta equiv="refresh" content="10;url=\\shared location">
where 10 is the number of seconds, after which the refresh occurs.
This was referred from the following link.

Wednesday, December 2, 2009

Friday, July 17, 2009

How to add Web Resources (ascx,aspx,asmx etc) to a Class Library in Visual Studio

Open the .vbproj or .csproj file of your Class Library in notepad. The reason you have to open it in notepad and not in Visual Studio is that, you cannot open that file in Visual Studio, directly. But it can be opened in Visual Studio after unloading the project. Anyways, after opening this file, add the following line below <ProjectGuid> tag.

<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} </ProjectTypeGuids>

Save it and close it and reopen the project. Thats it. You can add any ascx,aspx, asmx to a class library in Visual Studio.