Total Pageviews

5/07/2010

How to get Distinct Rows from DataSet / Datatable ?

Hello,

So many times we come across a situation where we require to have distinct rows from dataset or from data table on basis of particular field. I saw many people are writing separate function and looping through the datatable to avoid the duplicates, although they have binded data to Dataset.

The way is to simple in .net but many people are unaware of that.

please have look to following Few simple line which take care of avoiding duplicate Rows.



First option in ToTable is a boolean which indicates, you want distinct rows or not?

Second option in the ToTable is the column name based on which we have to select distinct rows.

thanks

bhavik

5/05/2010

Add Meta data to picture while adding it in picture library in Moss

Hi,

Very often we need to add Meta Data about picture adding it in to picture library like ( Description , Title , or ant custom column which we have added to picture library)

you can use HashTable to achieve this

below is code which is useful to do so.


thanks

bhavik

5/01/2010

How to find Content Query web part on SharePoint 2010

 Hello,

In SharePoint 2010 you can not find the "Content Query Web Part"  By default in the list.

if you need to add "Content Query Web Part"  you have to enable  the SharePoint Server Publishing Infrastructure feature.


  • Login As Site Collection Administrator.
  • Go to the Top Level Site Collection settings.
  • click on [Site Collection Features] in the Site Collection Administration Menu 
  • Activate the [SharePoint Server Publishing Infrastructure Feature]

4/18/2010

Error while multiple documents upload "Cannot run windows sharepoint services on this page"

If you get "Cannot run windows sharepoint services on this page" error in Sharpoint while uploading multiple documents. Following steps can be taken to resolve this issue:

1. Use default upload.aspx page from _layouts folder. Sometimes, upload.aspx becomes corrupt and overriding it with the original upload.aspx solves this problem.

2. Open Central Administration, then Application Management then Authentication Providers. Make sure you select your failed Web Application. Turn off Enable Client Integration (NO) then go back and Turn on Enable Client Integration (YES). Then IISRESET and try to upload multiple documents.

Regards,

Priyanka

4/15/2010

Sharepoint - Change the Name of the website-SubSite (WSS)

To be able to change the name of the website in TopLink bar ,
Quick Lunch  you need to go to the parent site,
go to Site Settings,
select Top link bar,
and then click the icon of the link you need to change.
Rename it and click OK.
Go back to Site Settings,
select Quick launch,
click the icon of the link you need to change.
And again, rename it and click OK.
With this 2 supplemental steps (I think) you got what you wanted.

4/13/2010

Download Free SharePoint Master Pages

Hi
You can download free Master page samples for SharePoint from Microsoft website.
Its simple in design but good for beginners.

Click Download to view the download page

The Link also has the instructions to setup.
Regards
Priyanka

3/24/2010

Strongly-typed access to Master Pages controls:



The PreviousPageType directive isn't the only one that provides strongly-typed access to controls. If you have public properties defined in a Master Page that you'd like to access in a strongly-typed manner you can add the MasterType directive into a page as shown next (note that the MasterType directive also allows a TypeName to be defined as with the PreviousPageType directive):

<%@ MasterType VirtualPath="MasterPage.master" %>

You can then access properties in the target master page from a content page by writing code like the following:
this.Master.HeaderText = "Label updated using MasterType directive with VirtualPath attribute.";

2/18/2010

Global Assembly Cache(GAC) Register DLL Problem ("Access is denied")

I faced an issue when I tried to add my dll file to Windows GAC.

Inspite of having signed DLL file, I received
"Access is denied" error message.

To come out of the issue, I found one of the easy way:

Go to Start > Control Panel > Administrator Tools > Services > Indexing Service
Stop the service.

Thats it, now I was able to deploy the DLL in GAC.



cheers.

2/08/2010

Download ASP.NET MVC 1.0

Click Here  to Download and install ASP.NET MVC 1.0. To install this you can use the new Microsoft Web Platform Installer V2 this will provide you an integrated setup experience for the entire Microsoft web stack.

even ASP.NET MVC 1.0 source code is also available. Scroll down to the bottom of the ASP.NET MVC Download page and you will find links for that over there.The ASP.NET MVC source code includes a VS 2008 project file that enables you to build it.

cheers.

2/01/2010

Disable Right Click for your website using JavaScript on Internet Explorer.

Hello,

If you want to prevent your user from performing right click on your web site in Internet Explorer then you can try this basic trick to do it. Although its not 100% accurate but still it works and can be done easily where its not that much important to really disable it.
Just Add "oncontextmenu="return false""  to you body tage in HTML 

<BODY oncontextmenu="return false">


When any user perform right click on the web page the menu is requested, the oncontextmenu event runs, and we instantly cancel it using JavaScript. this way you can prevent your user to view some precious code and even prevent your user to open web page in multiple windows to.

cheers

1/24/2010

Discoverd Benifits of Visual Studio 2010

Hello viewers listing some of the discovered benefits for Visual Studio 2010.
----------------------------------------------------------------------------------------------

  1. Asp.net MVC
  2. Integration with Jquery
  3. The incredible shrinking session state
  4. Extensible Request Validation
  5. Auto-Start Web Applications
  6. Performance monitoring for Individual applications in a single worker process
  7. Enhancement in Controls like List view, CheckboxList , RadiobuttonList , Menu control
  8. Asp.net Chart Control
  9. New improved Microsoft Ajax Library
  10. Enabling view state for individual controls
  11. Web. Config File Modification
  12. Changes to browser capabilities
  13. Routing in Asp.net 4
  14. Setting Client Ids
  15. Filtering data with the QueryExtender Control
  16. Project Template changes
  17. CSS improvements
  18. New field templates for URLs and Email Address
  19. Permanently redirecting a page
  20. Visual studio 2010 web designer Improvements
  21. Expanding the Range of allowable URLs
  22. Web application Deployment with Visual studio 2010

1/14/2010

Close Browser Without Confirmation Using JavaScript.

Some time we need to close our browser after some process, while doing this our browser(particularly internet explorer) start confirming it with confirmation box.

to avoid this you can use this code at your server side after your code is executed just write this.


  

1/10/2010

ASP.NET application Time out Problem, Timeout in less than 20 minutes

Some time your asp.net application time out in less then 20 min which is actually default time out.
there are several causes for this problem.

Change the session state configuration in Web.config (Default: 20 minutes)

<sessionState timeout="120" cookieless="AutoDetect">





IIS worker process recycle too often

IIS worker process may recycle less than 20 minutes if you have lots of applications share a same application pool. Usually it will fix the problem if you put your application in a stand alone application.

Change the IIS worker process idle timeout value (Default: 20 minutes)

You can change it at IIS Manager > Application Pools > DefaultAppPool > Properties > Performance.


1/09/2010

ASP.NET Menu is not Working in Google Chrome and Apple Safari Browser

If your website is using ASP.NET Menu Control, the menu part will not work in Google Chrome browser and Apple Safari browser. The look and feel of the main menu is different. Submenu does not show up.


There is an easy fix for this problem. Just copy and paste the following codes to your page load event of your code behind master page file. You may need to copy it to every page if you do not use master page.



Partial Class Main
     Inherits System.Web.UI.MasterPage

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If Request.UserAgent.IndexOf("AppleWebKit") > 0 Then
                Request.Browser.Adapters.Clear()
            End If
        End Sub
    End Class

1/06/2010

Slow SQL Server Management Studio in Vista Operating System

It is very slow when you try to open a remote database using SQL Server Management Studio in Vista operating system.


Solution



Disable TCP Auto-Tuning and Receive-Side Scaling State.
  • Go to Start > Programs > Accessories. Right click "Command Prompt" and choose "Run as administrator".





  • Type the following command and press Enter:


C:\>netsh interface tcp set global rss=disabled 
C:\>netsh interface tcp set global autotuninglevel=disabled


  • Reboot the computer

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews