Monthly Archives: April 2013

Row number in Oracle…..

—Before 8i SELECT ROWNUM FROM ALL_OBJECTS WHERE ROWNUM <= &N; –SQL 8i SELECT ROWNUM FROM (SELECT 1 FROM DUAL GROUP BY CUBE(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) WHERE ROWNUM <= &N; –SQL 9i SELECT * FROM (SELECT ROWNUM FROM DUAL CONNECT BY LEVEL <= &N); –SQL 10g SELECT ROWNUM FROM DUAL […]

Refresh Materilized View in Oracle

BEGIN DBMS_SNAPSHOT.REFRESH(‘MV_CURRENT_OPERATIONS’); end;

Operation is not valid due to the current state of the object.

Whenever a post back is done, this error occurs when form fields are very large in numbers. The stack trace is: at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() at System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) at System.Web.HttpRequest.FillInFormCollection() By default, the maximum value of MaxHttpCollection is 1000. To solve this error, increase MaxHttpCollection value. Try adding the following setting in your web.config‘s <appsettings> […]

Content Editor Webpart code for hide quick lunch,recycle bin etc…..

<STYLE> .ms-quicklaunchheader { display: none } .ms-sbrow { display: none } span#ctl00_PlaceHolderGlobalNavigation_PlaceHolderGlobalNavigationSiteMap_GlobalNavigationSiteMap { display: none } .ms-recyclebin { display: none } .ms-navframe { display: none } .ms-quicklaunch { display:none; } .ms-pagetitleareaframe { display: none; } .ms-titleareaframe { display: none; } </STYLE>

Create Simple Web Part for SharePoint 2007

To create Web Part for MOSS 2007 you can create new Class Library Project with C# or VB and you have to add “System.Web”, “Microsoft.SharePoint.dll” to the references of the project. After that you can create class and inherit a WebPart class from Microsoft.SharePoint. WebPartPages namespace which is in the “Microsoft.SharePoint.dll”.In this Web Part you […]

Using Custom ASP.NET Controls in a SharePoint Web Part

You also can add a custom controls “ascx” files which is allowing you to put your controls, html layout, css, javascripts and events handlers, so you can create your own control and you add whatever you want of ASP.NET controls and server side codes, but first you have to change trust level on the web.config […]

Using ASP.NET Controls in SharePoint Web Part

if you want to use ASP.NET controls or any of server side controls you can add it in the Controls property, which is a controls collection for the web part. To do that you can override CreateChildControl method and there you add any server side controls using Microsoft.SharePoint.WebPartPages; using System.Web.UI.WebControls; namespace MyWebPart { public class […]