<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2848574856438876207</id><updated>2024-09-07T00:03:51.804+05:30</updated><title type='text'>asp.net</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://aspassembly.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2848574856438876207/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://aspassembly.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>p</name><uri>http://www.blogger.com/profile/09748330136952851487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2848574856438876207.post-8448199707016023894</id><published>2015-04-20T23:16:00.002+05:30</published><updated>2015-04-20T23:25:08.697+05:30</updated><title type='text'>How to display multiple apps on a single page in Sharepoint 2013 using angularjs</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3&gt;
Manual Bootstrapping of angularjs&lt;/h3&gt;
&lt;pre class=&quot;brush: js&quot;&gt;angular.bootstrap(document, [&#39;&amp;lt;&lt;nameofyourapp&gt;&amp;gt;&#39;])
    &lt;/nameofyourapp&gt;&lt;/pre&gt;
Define your app and  modules
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;
&lt;div id=&quot;appname1&quot;&gt;
&lt;span ng-controller=&quot;module1&quot;&gt;
            Sum:2+2 = {{2+2}}
        &lt;/span&gt;
    &lt;/div&gt;
&lt;/pre&gt;
Now you have to do the Manual Bootstrapping
Note:you can define multiple apps on a page.
&lt;h3&gt;Define you app&lt;/h3&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:js&quot;&gt;    
    app.controller(&#39;module1&#39;, function ($scope,$http) {
    $http({
    method: &#39;GET&#39;,
    url: &#39;specifyurl&#39;,
    headers: {
    &#39;Accept&#39;: &#39;application/json;odata=verbose&#39;
    }
    }).success(function (data) { var result = data.d;}).error(function (data, status, headers, config) { });
    });
    &lt;/pre&gt;
    You should call angular.bootstrap() after you&#39;ve loaded or defined your modules.&lt;br/&gt;
    You cannot add controllers, services, directives, etc after an application bootstraps.&lt;br/&gt;
    
     &lt;h2&gt;Bootstrap Angular &lt;/h2&gt;
     &lt;pre class=&quot;brush:js&quot;&gt;    
     angular.bootstrap(document.getElementById(&quot;app1&quot;,[&#39;module1&#39;]);
     &lt;/pre&gt;

     You should not use the ng-app directive when manually bootstrapping your app&lt;br/&gt;
     &lt;a href=&quot;https://docs.angularjs.org/guide/bootstrap&quot;&gt;Refrence&lt;/a&gt;&lt;br/&gt;
    



&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspassembly.blogspot.com/feeds/8448199707016023894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspassembly.blogspot.com/2015/04/how-to-display-multiple-apps-on-single.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2848574856438876207/posts/default/8448199707016023894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2848574856438876207/posts/default/8448199707016023894'/><link rel='alternate' type='text/html' href='http://aspassembly.blogspot.com/2015/04/how-to-display-multiple-apps-on-single.html' title='How to display multiple apps on a single page in Sharepoint 2013 using angularjs'/><author><name>p</name><uri>http://www.blogger.com/profile/09748330136952851487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2848574856438876207.post-9079792552023644554</id><published>2011-07-06T16:08:00.001+05:30</published><updated>2011-07-06T23:34:52.867+05:30</updated><title type='text'>sharepoint 2010 Javascript Function to acess the Control</title><content type='html'>Here is a Javascript Function to acess the Control.&lt;br /&gt;
&lt;pre&gt;tagName – The name of the tag rendered in the form’s HTML
identifier – The string associated with the SharePoint type of the relevant ield
title – The value of the relevant HTML tag’s “title” attribute, which also matches the field’s display name
&lt;/pre&gt;&lt;br /&gt;
ref from:http://blogs.msdn.com/b/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: javascript&quot;&gt;function getTagFromIdentifierAndTitle(tagName, identifier, title) { 
     var len = identifier.length; 
     var tags = document.getElementsByTagName(tagName); 
     for (var i=0; i &lt; tags.length; i++) { 
          var tempString = tags[i].id; 
          //if you are not sure what the actual title of your field is, uncomment this alert 
          //alert(tags[i].title); 
          if (tags[i].title == title &amp;&amp; (identifier == &quot;&quot; || tempString.indexOf(identifier) == tempString.length - len)) { 
               return tags[i]; 
          } 
      } 
      return null; 
}
&lt;/pre&gt;
for eg: if you control rendered as(Use FireBug or Devlopers Tool)
&lt;pre&gt;&quot;&lt;b&gt;&lt;u&gt;input&lt;/u&gt;&lt;/b&gt; type=&quot;text&quot; autopostback=&quot;0&quot; class=&quot;ms-input&quot; &lt;b&gt;&lt;u&gt;title=&quot;Calendar2&quot;&lt;/u&gt;&lt;/b&gt; id=&quot;ctl00_m_g_267b3037_41f7_4630_8946_1f2378ebeda2_ctl00
_ctl05_ctl03_ctl00_ctl00_ctl04_ctl00_ctl00_DateTimeField_
&lt;b&gt;&lt;u&gt;DateTimeFieldDate&lt;/u&gt;&lt;/b&gt;&quot; 
maxlength=&quot;45&quot; name=&quot;ctl00$m$g_267b3037_41f7_4630
_8946_1f2378ebeda2$ctl00$ctl05$ctl03$ctl00$ctl00$ctl04$ctl00$ctl00
$DateTimeField$DateTimeFieldDate&quot;
&lt;/pre&gt;Here
&lt;pre&gt;&lt;b&gt;Tag Name:&lt;/b&gt; is input
&lt;b&gt;Title:&lt;/b&gt; is Calendar2
&lt;b&gt;Identifier:&lt;/b&gt; is DateTimeFieldDate
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspassembly.blogspot.com/feeds/9079792552023644554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspassembly.blogspot.com/2011/07/sharepoint-2010-javascript-function-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2848574856438876207/posts/default/9079792552023644554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2848574856438876207/posts/default/9079792552023644554'/><link rel='alternate' type='text/html' href='http://aspassembly.blogspot.com/2011/07/sharepoint-2010-javascript-function-to.html' title='sharepoint 2010 Javascript Function to acess the Control'/><author><name>p</name><uri>http://www.blogger.com/profile/09748330136952851487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2848574856438876207.post-8747614877808538378</id><published>2011-02-25T20:51:00.000+05:30</published><updated>2011-03-05T23:43:30.947+05:30</updated><title type='text'>Watermark on a Exisiting PDF using iTextsharp Library</title><content type='html'>&lt;a href=&quot;http://sourceforge.net/projects/itextdotnet/&quot;&gt;iText Download&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Creating a Template For Text Watermark&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: c#&quot;&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iTextSharp.text;
using iTextSharp.text.pdf;
using System.IO;
using System.Drawing;
namespace ConsoleApplication1
{
    public static class GenrateStampingTemplate
    {

        public static void createTemplate(string StampSignautre, string stampFilename)
        {
            Document document = new Document();
            PdfWriter writer = PdfWriter.GetInstance(document, 
                new FileStream(stampFilename, FileMode.Create));
            document.Open();
            iTextSharp.text.Font font =
                new iTextSharp.text.Font(iTextSharp.text.Font.FontFamily.COURIER, 22, 
                    iTextSharp.text.Font.NORMAL,
                    new BaseColor(System.Drawing.Color.Blue));
            ColumnText.ShowTextAligned(writer.DirectContent, Element.ALIGN_CENTER, 
                new Phrase(StampSignautre, font), 297.5f, 421, 45);
            document.Close();
        }
    }
}


&lt;/pre&gt;&lt;pre class=&quot;brush:c#&quot;&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iTextSharp.text.pdf;
using System.IO;
using iTextSharp.text;

namespace ConsoleApplication1
{
    /// &lt;summary&gt;
    /// This class is used to Put Watermark Text and Image on PDF Document
    /// &lt;/summary&gt;
   public static class StampDocument
   {
       
      public static void PutTextWateMark(string path,string waterMarkTemplate)
      {
            byte[] _byte = File.ReadAllBytes(path);
            byte[] _templateBye = File.ReadAllBytes(waterMarkTemplate);
            PdfReader reader = new PdfReader(_byte);
            PdfStamper pdfStamper = new PdfStamper(reader, 
                new FileStream(path, FileMode.Create));
            PdfContentByte content;
            PdfReader templateReader = new PdfReader(_templateBye);
            PdfImportedPage page = pdfStamper.GetImportedPage(templateReader, 1);
            for (int i = 0; i &lt; reader.NumberOfPages; i++)
            {
                content = pdfStamper.GetUnderContent(i+1);
                content.AddTemplate(page, 0, 0);
            }
            pdfStamper.Close();
            templateReader.Close();
            
     }
     public static void PutImageWaterMark(string path, string imagePath)
     {
            byte[] _byte = File.ReadAllBytes(path);
            
            PdfReader reader = new PdfReader(_byte);
            PdfStamper pdfStamper = new PdfStamper(reader,
                new FileStream(path, FileMode.Create));
            Image img = Image.GetInstance(imagePath);
            PdfContentByte content;
            
            img.SetAbsolutePosition(200, 400);
            
            for (int i = 0; i &lt; reader.NumberOfPages; i++)
            {
                content = pdfStamper.GetUnderContent(i+1);
                content.AddImage(img);
            }
            pdfStamper.Close();
            

     }
  }
}
&lt;/pre&gt;
&lt;pre class=&quot;brush:c#&quot;&gt;//using custom Text
GenrateStampingTemplate.createTemplate(&quot;Watermark&quot;, &quot;d:\\CompanyStamp.pdf&quot;);
StampDocument.PutTextWateMark(&quot;d:\\test.pdf&quot;, &quot;d:\\CompanyStamp.pdf&quot;);
//using image
StampDocument.PutImageWaterMark(&quot;d:\\test.pdf&quot;, &quot;d:\\test.img&quot;);
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspassembly.blogspot.com/feeds/8747614877808538378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspassembly.blogspot.com/2011/02/watermark-on-exisiting-pdf-using.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2848574856438876207/posts/default/8747614877808538378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2848574856438876207/posts/default/8747614877808538378'/><link rel='alternate' type='text/html' href='http://aspassembly.blogspot.com/2011/02/watermark-on-exisiting-pdf-using.html' title='Watermark on a Exisiting PDF using iTextsharp Library'/><author><name>p</name><uri>http://www.blogger.com/profile/09748330136952851487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry></feed>