Posts

Change logo of a pdf documment in every page

 private void button2_Click(object sender, EventArgs e)         {             String sourceFileName = "D:\\reader2.pdf";             String imageFileName = "D:\\AxaltaByAnil.jpg";             String newFileName = "E:\\" + DateTime.Now.Millisecond + ".pdf";             OpenFileDialog dlg = new OpenFileDialog();             ////string filepath;             dlg.Filter = "PDF Files(*.PDF)|*.PDF|All Files (*.*)|*.*";             if (dlg.ShowDialog() == DialogResult.OK)             {                 sourceFileName = dlg.FileName.ToString();                 InsertImageToPdf(sourceFileName, imageFileName, newFileName);       ...

Convert a pdf document to a txt file word document,

private void button1_Click(object sender, EventArgs e)         {             OpenFileDialog dlg = new OpenFileDialog();             string filepath;             dlg.Filter = "PDF Files(*.PDF)|*.PDF|All Files (*.*)|*.*";             if (dlg.ShowDialog() == DialogResult.OK)             {                 filepath = dlg.FileName.ToString();                 string strtext = string.Empty;                 try                 {                     PdfReader reader = new PdfReader(filepath);                     for (int page = 1; page <= reader.NumberOfPag...

How to save site as a template in sherepoint2013

Image
In SharePoint 2013 Sites are Saved as Template in the same way as in earlier versions but there are some steps that you need to consider before moving forward. Important things to know about Saving Sites as Template - In SharePoint 2013, by default, you Cannot Save a Publishing Site (or a Site with Publishing feature activated) as a Site Template.This however Can be done using a workaround (i.e. using _layouts/savetmpl.aspx url).  As in SharePoint 2010 Saving Sites as Template does not generate a .stp file, it gets saved as a .wsp in Solutions gallery. When Saving a Site as Template the WSP generated is temporarily saved in the  c:\temp or in c:\windows\temp  folder and later in the solution gallery on SharePoint. Make sure that the App pool account has Full permissions to  c:\temp  and  c:\windows\temp  folder. You Cannot Create a Subsite based on a Site Template that was Created in SharePoint 2010. You will need to recreate the sit...

How to Create a subsite in sharepoint 2013

Image
Lets look at the Steps to create a subiste 1. Click on Site Settings Wheel in the upper right corner of you site and select “Site Contents” page. 2. In the Site Contents Page, under Subsites heading click on “new subsite” Link. 3. When New SharePoint Site page appears, enter Title and Description, Web Site Address (URL), select a template, select Permissions and Navigation Inheritance.

SPSiteDataQuery to get data from multiple lists in site collection level in sharepoint 2013

using Microsoft.SharePoint; using Microsoft.SharePoint.WebControls; using System; using System.ComponentModel; using System.Data; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; namespace SPListDataQuery.ListDataQuery {     [ToolboxItemAttribute(false)]     public class ListDataQuery : WebPart     {         private GridView grid;         private GridView myGrid;         private TextBox txtbox;         protected override void CreateChildControls()         {             this.grid = new GridView();             this.Controls.Add(this.grid);             this.myGrid = new GridView();             this.Controls.Add(this.myGrid);         ...

bind Lookup Field Value to a SPList Column

  SPFieldLookupValue   objLookupCategory  = new  SPFieldLookupValue (Convert.ToUInt16( ddlCategories.SelectedValue ), Convert.ToString( ddlCategories.SelectedItem.Text ));                                oConcItem ["Category"] =  objLookupCategory ;//Lookup  

check current user belog to whcich group in List Of Grops in A list Column

 using ( SPSite  site = new  SPSite ( SPContext.Current.Web.Url ))                               {                                   using ( SPWeb   objWeb  = site.OpenWeb())                                   {                                        SPList   oList  = objWeb.Lists["Kaizen Category"]; ...