Normally, we run code under elevated previleges that takes System User account in created by modified by. If we want to reflect Created By/Modifed by with logged in user, you have to specify UserToken while opening site.

SPUserToken loggedInUserToken = SPContext.Current.Web.CurrentUser.UserToken;

SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite objSite = new SPSite(SPContext.Current.Web.Url,loggedInUserToken))
{
using (SPWeb objWeb = objSite.OpenWeb())
{
objWeb.AllowUnsafeUpdates = true;
SPListItem lstItem= listItemCollection.Add();
lstItem["Foo"] = “Bar”
lstItem.Update();

Posted by: msqr | October 27, 2009

Video file to flash over the web

Converting video file to FLV
1) Desktop software
E.g. Adobe CS3 Video encoder – Here’s Online tutorial

2) Server side software
They provide either object model or command line exe to batch convert Video file to FLV
Open source approach

FFmpeg (http://ffmpeg.mplayerhq.hu)
FFmpeg-PHP (http://ffmpeg-php.sourceforge.net)
Mplayer + Mencoder (http://www.mplayerhq.hu/design7/dload.html)
flv2tool (http://inlet-media.de/flvtool2)
Libogg + Libvorbis (http://www.xiph.org/downloads)
LAME MP3 Encoder (http://lame.sourceforge.net)
Commercial approach

http://www.sothinkmedia.com/flash-video-encoder-command-line/

Posted by: msqr | October 27, 2009

Synch WSS / MOSS 2007 calendar with Outlook 2007

http://wssv3faq.mindsharp.com/Lists/v3%20WSS%20FAQ/DispForm.aspx?ID=248

https://sharepoint.missouri.edu/wiki/Wiki%20Pages/Connect%20to%20Outlook%20Issue.aspx

Posted by: msqr | October 10, 2009

WCFSVCHost starting while debugging VS2008 project

To disable the Test WCF Client (WcfTestClient.exe / WcfSvcHost) that comes with VS2008 you have to edit the goop that is the Project file.

Delete the following GUID from the PropertyGroup as shown below: {3D9AD99F-2412-4246-B90B-4EAA41C64699}

For more info
Check this link

Posted by: msqr | September 9, 2009

PDF Form design –

Requirements
===============
1. Install Adobe Acrobat 8 Pro or later
2. Install Adobe Live Cycle Designer

Steps
==========
1. Open Adobe Live Cycle Designer
2. Create form fields
3. Create Signature Field
4. Go to object pallete –> Signature tab
5. Check Lock Fields After Signing
6. Create and specify collection of form fields to be locked after document(pdf) is digitally signed
7. Note to exclude Print and Email Form button from above collection
8. Create a “Button”
9. Go to object pallete –> Field Tab
10. Select Control Type = Submit
11. Go to Submit tab
12. int the Submit to URL: specify url or mailto:emailaddress@domain.com
13. Select Submit As = PDF
14. Now save form
15. Open this form in Acrobat Pro (8 or later version)
16. Go to Advanced –> Extend Features in Acrobat Reader
17. Save file as .pdf
18. This will the form to be submitted to client

As a student, I always used to wonder why do I have to pay for learning / developing on Microsoft platform if my development is not generating any revenue. And to be frank, all of  us(students) used to rush to nearest Pirated CD vendor or try Peer to peer networks to get cracks. But, It looks like Microsoft has listened to our dilemma and Things have changed now.

Some of the cool development tools available are:

  • Visual Studio 2008 Professional
  • SQL 2005 Developer
  • Windows Server 2003(For sharepoint development)

It is called DreamSpark.

If you are student, Getting software like Visual studio 2008 is very simple,  Rush to nearest Microsoft Parnter location, Show your college identity card and collect your licensed copy of the software

For more details visit this link,
http://www.dreamsparkindia.com/dreamspark/GetDreamTools.aspx?
Tab=1#

Posted by: msqr | June 17, 2009

Dotnetnuke Skinnning

How to package skin?
ASCX / html+xml file represent skin
Create associated thumbnail to act as preview for this skin when uploaded
Zip all resources(css/images/thumbnail/skin)

Diff between ASCX and HTML skin?
Html skin facilitates designers to create/modify layout in their favourite tool(dreamweaver). At the same time it requires xml file for managing attributes of skin object
Everytime you parse html skin, it generates ASCX.
This ASCX skin gets inserted into Default.aspx page[SkinPlaceholder]

How to upload new skin?
Go to host > Skin, upload new skin for portal.

Do I need container or just skin is sufficient?
Container allows you to define rectangular/rounded rectangle around content pane and also actions menu.

How do I add menu?
Explore DNNMenu

How do I add external stylesheets?
Styles.ascx

Book to read?

http://www.packtpub.com/dotnetnuke-4.0-skinning-tutorial/book

Logo?
DNNLogo

Posted by: msqr | April 27, 2009

Quick Access to MSDN on low speed internet

Scott doing comprehensive post on low bandwidth MSDN version,
Low bandwidth MSDN

Posted by: msqr | January 29, 2009

Adding first blog from Word 2007

Having read simple tutorial Dotnet and opensource: better together on publishing blog post from word 2007, I could not resist myself experimenting it with my personal blog – msqr.wordpress.com.

Let’s see how it goes.

Posted by: msqr | January 5, 2009

register and pass argument to event handler

Many times we are required to hook event handler with the element through javascript. Main problem we come across during this time is how to pass arguments to registered event handler.

Here’s the handy function that returns Element triggered event handler

function GetEventSource(evt)
{
var ie_var = "srcElement";
var moz_var = "target";

if(window.addEventListener)
{
return evt[moz_var];
}
else
{
return evt[ie_var];
}
}

//Register event handler:
if(window.addEventListener){ // Mozilla, Netscape, Firefox
lnk.addEventListener('click', CallDoPostBackMM, false); }
else { // IE
lnk.attachEvent('onclick', CallDoPostBackMM);
}

function CallDoPostBackMM(evt)
{
var lnk= GetEventSource(evt);
//Now, you have access to lnk element:
//you can retrieve navigateURL, href, set javascript and so on.
}

Older Posts »

Categories

Follow

Get every new post delivered to your Inbox.