qr code generator for c# NOTE in Visual C#

Creation QR Code in Visual C# NOTE

NOTE
QR Code ISO/IEC18004 Creation In C#.NET
Using Barcode creator for .NET framework Control to generate, create QR Code image in .NET framework applications.
www.OnBarcode.com
Decode QR Code 2d Barcode In Visual C#.NET
Using Barcode recognizer for VS .NET Control to read, scan read, scan image in .NET applications.
www.OnBarcode.com
When deploying solution packages from Visual Studio 2010, the Features will be activated by default. You can change this by editing the properties of the project and setting the Active Deployment Configuration option to No Activation.
GS1-128 Encoder In C#
Using Barcode generator for .NET framework Control to generate, create UCC.EAN - 128 image in VS .NET applications.
www.OnBarcode.com
Barcode Maker In C#.NET
Using Barcode generator for .NET framework Control to generate, create Barcode image in .NET framework applications.
www.OnBarcode.com
Each Feature can also contain a Feature receiver. The Feature receiver is a class in an assembly that derives from the SPFeatureReceiver class and is used to programmatically perform actions on different events. This class has five event methods that are called on by SharePoint:
Data Matrix 2d Barcode Generation In Visual C#
Using Barcode creation for .NET Control to generate, create Data Matrix ECC200 image in Visual Studio .NET applications.
www.OnBarcode.com
PDF 417 Creator In C#.NET
Using Barcode printer for .NET framework Control to generate, create PDF417 image in .NET applications.
www.OnBarcode.com
FeatureActivated Fired when the Feature is activated FeatureDeactivating Fired when the Feature is deactivating FeatureInstalled Fired when the Feature is installed FeatureUninstalling Fired when the Feature is uninstalling FeatureUpgrading Fired when the Feature is upgraded
Barcode Generator In C#
Using Barcode printer for .NET Control to generate, create Barcode image in VS .NET applications.
www.OnBarcode.com
Encode USD-3 In Visual C#
Using Barcode printer for .NET Control to generate, create USD-3 image in .NET applications.
www.OnBarcode.com
The runtime filter sample in chapter 5 used a Feature receiver to modify the web.config file for the web application in which the Feature was activated. Feature receivers are a great way to perform actions that you can t do declaratively in the package, Feature, or elements manifests using the XML syntax. Feature receivers are compiled code and can do basically anything, and they can take advantage of the state and information in the currently targeted Feature scope. You can add receivers to the Feature by right-clicking the feature in the Solution Explorer and selecting Add Event Receiver, as shown in figure 7.1. This will create a class under your Feature node that contains the receiver. By default, all methods are commented out and you need to uncomment those you re going to implement for use. The Feature receivers have two methods that can be used when the solution is installed in the farm. These methods are fired after the installation of the Feature in the farm, and the methods are run on each server in the farm. The activation and deactivation methods are only run on one of the servers in the farm.
Quick Response Code Encoder In None
Using Barcode encoder for Word Control to generate, create QR-Code image in Word applications.
www.OnBarcode.com
Making Denso QR Bar Code In None
Using Barcode creation for Microsoft Excel Control to generate, create Quick Response Code image in Office Excel applications.
www.OnBarcode.com
Solution packages
Encoding EAN / UCC - 13 In Objective-C
Using Barcode generator for iPad Control to generate, create EAN-13 image in iPad applications.
www.OnBarcode.com
Making UCC - 12 In VB.NET
Using Barcode generation for Visual Studio .NET Control to generate, create UPC-A image in .NET applications.
www.OnBarcode.com
Figure 7.1 Feature Event Receivers are added to a Feature by right-clicking the Feature in the Solution Explorer and selecting Add Event Receiver. FEATURE DEACTIVATION
UCC - 12 Maker In .NET
Using Barcode encoder for Reporting Service Control to generate, create UPC A image in Reporting Service applications.
www.OnBarcode.com
Create Data Matrix 2d Barcode In Visual Basic .NET
Using Barcode encoder for Visual Studio .NET Control to generate, create Data Matrix 2d barcode image in VS .NET applications.
www.OnBarcode.com
When a Feature is deactivated, it fires the FeatureDeactivating method of the Feature receiver, but it doesn t undo the actions completed by the module statements in an elements manifest. For instance, the Web Part isn t removed from the Web Part Gallery. The reason that SharePoint doesn t remove the .webpart file is that it d then remove any customizations made to the file. If you want to make sure that the .webpart file is removed from the Web Part Gallery, you have to implement a Feature receiver. Listing 7.1 shows you how.
PDF417 Maker In None
Using Barcode drawer for Word Control to generate, create PDF 417 image in Office Word applications.
www.OnBarcode.com
Print UPC-A In Java
Using Barcode creation for Java Control to generate, create UCC - 12 image in Java applications.
www.OnBarcode.com
Listing 7.1 Deactivation code to remove Web Parts from the gallery
Code 39 Generator In VB.NET
Using Barcode printer for .NET framework Control to generate, create Code-39 image in .NET applications.
www.OnBarcode.com
Barcode Reader In Java
Using Barcode reader for Java Control to read, scan read, scan image in Java applications.
www.OnBarcode.com
public override void FeatureDeactivating( SPFeatureReceiverProperties properties) { SPSite site = properties.Feature.Parent as SPSite; if(site != null) { SPList gallery = site.RootWeb.GetCatalog( SPListTemplateType.WebPartCatalog); SPListItem webPart = gallery.Items.Cast<SPListItem>() .FirstOrDefault(w => w.Name == "DeploymentWebPart.webpart"); if (webPart != null) { webPart.Delete();
Barcode Generation In None
Using Barcode generator for Software Control to generate, create Barcode image in Software applications.
www.OnBarcode.com
GTIN - 13 Generator In None
Using Barcode encoder for Online Control to generate, create EAN / UCC - 13 image in Online applications.
www.OnBarcode.com
} } }
Packaging, deployment, and security
The Feature receiver has one parameter, properties, containing information about the current Feature. Using that parameter, you get the current site collection. Using the root web GetCatalog method, you retrieve the Web part Gallery. Because the Items collection is a nongeneric collection and you re using LINQ, the collection is cast to IEnumerable. The first item matching the name of the Web Part controls description file defined in the elements.xml file is retrieved. If an item is found, it s deleted from the gallery. This method of removing items from the Web Part Gallery works fine if you re interested only in removing the items that were added through the Feature. But because users can customize and add items to the Web Part Gallery, the filename might be changed or there might be multiple Web Parts defined in the gallery using the Web Part type. These Web Parts won t be deleted by this Feature receiver. To ensure that all Web Part control description files in the Web Part Gallery that use the type of the Web Part defined in the Feature are removed, you need to change the deactivation method. Listing 7.2 shows the modified method. This method iterates through all items in the Web Part Gallery and checks the type used by the Web Part.
Copyright © OnBarcode.com . All rights reserved.