<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" 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" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CkYGQXo7fip7ImA9WhJUFEo.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952</id><updated>2012-09-12T10:15:20.406-07:00</updated><category term="jQuery" /><category term="bhajan" /><category term="MOSS 2007" /><category term="Addin" /><category term="MS Access" /><category term="RamSukhaDasJi" /><category term="Javascript" /><category term="Office" /><category term="SQL Server" /><category term=".Net" /><category term="Others" /><category term="AJAX" /><category term="song" /><category term="music" /><category term="XML" /><category term="Blogger" /><category term="Google" /><category term="C#" /><category term="meditation" /><category term="VSTO" /><category term="Webservice" /><category term="iPhone" /><category term="Firefox" /><category term="SEO" /><category term="sharepoint designer" /><category term="Database" /><category term="html" /><category term="Projects" /><category term="Objective-C" /><category term="Sharepoint" /><category term="asp.net" /><category term="VS" /><category term="VSeWSS" /><category term="Regular Expression" /><category term="InfoPath" /><category term="Social Networking" /><title>jQuery, ASP.NET, C#, MVC, Ajax, Web Tutorials</title><subtitle type="html">Web designers and developers related to ASP.NET,C#, jQuery,MVC, SQL Server, Ajax, Web Services, HTML, CSS, javascript,Wordpress, online tools and much more.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://urenjoy.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>110</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/urenjoy" /><feedburner:info uri="urenjoy" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>urenjoy</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;A0MESX85fCp7ImA9WhVTEks.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-1755301739883228333</id><published>2012-02-26T07:14:00.001-08:00</published><updated>2012-02-26T07:16:48.124-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-26T07:16:48.124-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><title>Audit Trail Generator for Microsoft SQL</title><content type="html">Audit Trail With Shadow Table and Triggers &lt;br /&gt;Ref: &lt;a href="http://www.codeproject.com/Articles/21068/Audit-Trail-Generator-for-Microsoft-SQL"&gt;http://www.codeproject.com/Articles/21068/Audit-Trail-Generator-for-Microsoft-SQL&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;http://www.blogger.com/img/blank.gif&lt;br /&gt;SET ANSI_NULLS ON&lt;br /&gt;GO&lt;br /&gt;SET QUOTED_IDENTIFIER ON&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE [dbo].[GenerateAudittrail]&lt;br /&gt; @TableName varchar(128),&lt;br /&gt; @Owner varchar(128) = 'dbo',&lt;br /&gt; @AuditNameExtention varchar(128) = '_shadow',&lt;br /&gt; @DropAuditTable bit = 0&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt; -- Check if table exists&lt;br /&gt; IF not exists (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[' + @Owner + '].[' + @TableName + ']') and OBJECTPROPERTY(id, N'IsUserTable') = 1)&lt;br /&gt; BEGIN&lt;br /&gt;  PRINT 'ERROR: Table does not exist'&lt;br /&gt;  RETURN&lt;br /&gt; END&lt;br /&gt;&lt;br /&gt; -- Check @AuditNameExtention&lt;br /&gt; IF @AuditNameExtention is null&lt;br /&gt; BEGIN&lt;br /&gt;  PRINT 'ERROR: @AuditNameExtention cannot be null'&lt;br /&gt;  RETURN&lt;br /&gt; END&lt;br /&gt;&lt;br /&gt; -- Drop audit table if it exists and drop should be forced&lt;br /&gt; IF (exists (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[' + @Owner + '].[' + @TableName + @AuditNameExtention + ']') and OBJECTPROPERTY(id, N'IsUserTable') = 1) and @DropAuditTable = 1)&lt;br /&gt; BEGIN&lt;br /&gt;  PRINT 'Dropping audit table [' + @Owner + '].[' + @TableName + @AuditNameExtention + ']'&lt;br /&gt;  EXEC ('drop table ' + @TableName + @AuditNameExtention)&lt;br /&gt; END&lt;br /&gt;&lt;br /&gt; -- Declare cursor to loop over columns&lt;br /&gt; DECLARE TableColumns CURSOR Read_Only&lt;br /&gt; FOR SELECT b.name, c.name as TypeName, b.length, b.isnullable, b.collation, b.xprec, b.xscale&lt;br /&gt;  FROM sysobjects a &lt;br /&gt;  inner join syscolumns b on a.id = b.id &lt;br /&gt;  inner join systypes c on b.xtype = c.xtype and c.name &lt;&gt; 'sysname' &lt;br /&gt;  WHERE a.id = object_id(N'[' + @Owner + '].[' + @TableName + ']') &lt;br /&gt;  and OBJECTPROPERTY(a.id, N'IsUserTable') = 1 &lt;br /&gt;  ORDER BY b.colId&lt;br /&gt;&lt;br /&gt; OPEN TableColumns&lt;br /&gt;&lt;br /&gt; -- Declare temp variable to fetch records into&lt;br /&gt; DECLARE @ColumnName varchar(128)&lt;br /&gt; DECLARE @ColumnType varchar(128)&lt;br /&gt; DECLARE @ColumnLength smallint&lt;br /&gt; DECLARE @ColumnNullable int&lt;br /&gt; DECLARE @ColumnCollation sysname&lt;br /&gt; DECLARE @ColumnPrecision tinyint&lt;br /&gt; DECLARE @ColumnScale tinyint&lt;br /&gt;&lt;br /&gt; -- Declare variable to build statements&lt;br /&gt; DECLARE @CreateStatement varchar(8000)&lt;br /&gt; DECLARE @ListOfFields varchar(2000)&lt;br /&gt; SET @ListOfFields = ''&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; -- Check if audit table exists&lt;br /&gt; IF exists (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[' + @Owner + '].[' + @TableName + @AuditNameExtention + ']') and OBJECTPROPERTY(id, N'IsUserTable') = 1)&lt;br /&gt; BEGIN&lt;br /&gt;  -- AuditTable exists, update needed&lt;br /&gt;  PRINT 'Table already exists. Only triggers will be updated.'&lt;br /&gt;&lt;br /&gt;  FETCH Next FROM TableColumns&lt;br /&gt;  INTO @ColumnName, @ColumnType, @ColumnLength, @ColumnNullable, @ColumnCollation, @ColumnPrecision, @ColumnScale&lt;br /&gt;  &lt;br /&gt;  WHILE @@FETCH_STATUS = 0&lt;br /&gt;  BEGIN&lt;br /&gt;   IF (@ColumnType &lt;&gt; 'text' and @ColumnType &lt;&gt; 'ntext' and @ColumnType &lt;&gt; 'image' and @ColumnType &lt;&gt; 'timestamp')&lt;br /&gt;   BEGIN&lt;br /&gt;    SET @ListOfFields = @ListOfFields + @ColumnName + ','&lt;br /&gt;   END&lt;br /&gt;&lt;br /&gt;   FETCH Next FROM TableColumns&lt;br /&gt;   INTO @ColumnName, @ColumnType, @ColumnLength, @ColumnNullable, @ColumnCollation, @ColumnPrecision, @ColumnScale&lt;br /&gt;&lt;br /&gt;  END&lt;br /&gt; END&lt;br /&gt; ELSE&lt;br /&gt; BEGIN&lt;br /&gt;  -- AuditTable does not exist, create new&lt;br /&gt;&lt;br /&gt;  -- Start of create table&lt;br /&gt;  SET @CreateStatement = 'CREATE TABLE [' + @Owner + '].[' + @TableName + @AuditNameExtention + '] ('&lt;br /&gt;  SET @CreateStatement = @CreateStatement + '[AuditId] [bigint] IDENTITY (1, 1) NOT NULL,'&lt;br /&gt;&lt;br /&gt;  FETCH Next FROM TableColumns&lt;br /&gt;  INTO @ColumnName, @ColumnType, @ColumnLength, @ColumnNullable, @ColumnCollation, @ColumnPrecision, @ColumnScale&lt;br /&gt;  &lt;br /&gt;  WHILE @@FETCH_STATUS = 0&lt;br /&gt;  BEGIN&lt;br /&gt;   IF (@ColumnType &lt;&gt; 'text' and @ColumnType &lt;&gt; 'ntext' and @ColumnType &lt;&gt; 'image' and @ColumnType &lt;&gt; 'timestamp')&lt;br /&gt;   BEGIN&lt;br /&gt;    SET @ListOfFields = @ListOfFields + @ColumnName + ','&lt;br /&gt;  &lt;br /&gt;    SET @CreateStatement = @CreateStatement + '[' + @ColumnName + '] [' + @ColumnType + '] '&lt;br /&gt;    &lt;br /&gt;    IF @ColumnType in ('binary', 'char', 'nchar', 'nvarchar', 'varbinary', 'varchar')&lt;br /&gt;    BEGIN&lt;br /&gt;     IF (@ColumnLength = -1)&lt;br /&gt;      Set @CreateStatement = @CreateStatement + '(max) '   &lt;br /&gt;     ELSE&lt;br /&gt;      SET @CreateStatement = @CreateStatement + '(' + cast(@ColumnLength as varchar(10)) + ') '   &lt;br /&gt;    END&lt;br /&gt;  &lt;br /&gt;    IF @ColumnType in ('decimal', 'numeric')&lt;br /&gt;     SET @CreateStatement = @CreateStatement + '(' + cast(@ColumnPrecision as varchar(10)) + ',' + cast(@ColumnScale as varchar(10)) + ') '   &lt;br /&gt;  &lt;br /&gt;    IF @ColumnType in ('char', 'nchar', 'nvarchar', 'varchar', 'text', 'ntext')&lt;br /&gt;     SET @CreateStatement = @CreateStatement + 'COLLATE ' + @ColumnCollation + ' '&lt;br /&gt;  &lt;br /&gt;    IF @ColumnNullable = 0&lt;br /&gt;     SET @CreateStatement = @CreateStatement + 'NOT '   &lt;br /&gt;  &lt;br /&gt;    SET @CreateStatement = @CreateStatement + 'NULL, '   &lt;br /&gt;   END&lt;br /&gt;&lt;br /&gt;   FETCH Next FROM TableColumns&lt;br /&gt;   INTO @ColumnName, @ColumnType, @ColumnLength, @ColumnNullable, @ColumnCollation, @ColumnPrecision, @ColumnScale&lt;br /&gt;  END&lt;br /&gt;  &lt;br /&gt;  -- Add audit trail columns&lt;br /&gt;  SET @CreateStatement = @CreateStatement + '[AuditAction] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,'&lt;br /&gt;  SET @CreateStatement = @CreateStatement + '[AuditDate] [datetime] NOT NULL ,'&lt;br /&gt;  SET @CreateStatement = @CreateStatement + '[AuditUser] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,'&lt;br /&gt;  SET @CreateStatement = @CreateStatement + '[AuditApp] [varchar](128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL)' &lt;br /&gt;&lt;br /&gt;  -- Create audit table&lt;br /&gt;  PRINT 'Creating audit table [' + @Owner + '].[' + @TableName + @AuditNameExtention + ']'&lt;br /&gt;  EXEC (@CreateStatement)&lt;br /&gt;&lt;br /&gt;  -- Set primary key and default values&lt;br /&gt;  SET @CreateStatement = 'ALTER TABLE [' + @Owner + '].[' + @TableName + @AuditNameExtention + '] ADD '&lt;br /&gt;  SET @CreateStatement = @CreateStatement + 'CONSTRAINT [DF_' + @TableName + @AuditNameExtention + '_AuditDate] DEFAULT (getdate()) FOR [AuditDate],'&lt;br /&gt;  SET @CreateStatement = @CreateStatement + 'CONSTRAINT [DF_' + @TableName + @AuditNameExtention + '_AuditUser] DEFAULT (suser_sname()) FOR [AuditUser],CONSTRAINT [PK_' + @TableName + @AuditNameExtention + '] PRIMARY KEY  CLUSTERED '&lt;br /&gt;  SET @CreateStatement = @CreateStatement + '([AuditId])  ON [PRIMARY], '&lt;br /&gt;  SET @CreateStatement = @CreateStatement + 'CONSTRAINT [DF_' + @TableName + @AuditNameExtention + '_AuditApp]  DEFAULT (''App=('' + rtrim(isnull(app_name(),'''')) + '') '') for [AuditApp]'&lt;br /&gt;&lt;br /&gt;  EXEC (@CreateStatement)&lt;br /&gt;&lt;br /&gt; END&lt;br /&gt;&lt;br /&gt; CLOSE TableColumns&lt;br /&gt; DEALLOCATE TableColumns&lt;br /&gt;&lt;br /&gt; /* Drop Triggers, if they exist */&lt;br /&gt; PRINT 'Dropping triggers'&lt;br /&gt; IF exists (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[' + @Owner + '].[tr_' + @TableName + '_Insert]') and OBJECTPROPERTY(id, N'IsTrigger') = 1) &lt;br /&gt;  EXEC ('drop trigger [' + @Owner + '].[tr_' + @TableName + '_Insert]')&lt;br /&gt;&lt;br /&gt; IF exists (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[' + @Owner + '].[tr_' + @TableName + '_Update]') and OBJECTPROPERTY(id, N'IsTrigger') = 1) &lt;br /&gt;  EXEC ('drop trigger [' + @Owner + '].[tr_' + @TableName + '_Update]')&lt;br /&gt;&lt;br /&gt; IF exists (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[' + @Owner + '].[tr_' + @TableName + '_Delete]') and OBJECTPROPERTY(id, N'IsTrigger') = 1) &lt;br /&gt;  EXEC ('drop trigger [' + @Owner + '].[tr_' + @TableName + '_Delete]')&lt;br /&gt;&lt;br /&gt; /* Create triggers */&lt;br /&gt; PRINT 'Creating triggers' &lt;br /&gt; EXEC ('CREATE TRIGGER tr_' + @TableName + '_Insert ON ' + @Owner + '.' + @TableName + ' FOR INSERT AS INSERT INTO ' + @TableName + @AuditNameExtention + '(' +  @ListOfFields + 'AuditAction) SELECT ' + @ListOfFields + '''I'' FROM Inserted')&lt;br /&gt;&lt;br /&gt; EXEC ('CREATE TRIGGER tr_' + @TableName + '_Update ON ' + @Owner + '.' + @TableName + ' FOR UPDATE AS INSERT INTO ' + @TableName + @AuditNameExtention + '(' +  @ListOfFields + 'AuditAction) SELECT ' + @ListOfFields + '''U'' FROM Inserted')&lt;br /&gt;&lt;br /&gt; EXEC ('CREATE TRIGGER tr_' + @TableName + '_Delete ON ' + @Owner + '.' + @TableName + ' FOR DELETE AS INSERT INTO ' + @TableName + @AuditNameExtention + '(' +  @ListOfFields + 'AuditAction) SELECT ' + @ListOfFields + '''D'' FROM Deleted')&lt;br /&gt;&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/atIxlZG_mBw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/1755301739883228333/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2012/02/audit-trail-generator-for-microsoft-sql.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/1755301739883228333?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/1755301739883228333?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/atIxlZG_mBw/audit-trail-generator-for-microsoft-sql.html" title="Audit Trail Generator for Microsoft SQL" /><author><name>Tech .NET</name><uri>http://www.blogger.com/profile/04468859847035435763</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2012/02/audit-trail-generator-for-microsoft-sql.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUDRHc_fip7ImA9WhRSF00.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-6364903160857020873</id><published>2011-11-19T05:09:00.000-08:00</published><updated>2011-11-19T05:11:15.946-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-19T05:11:15.946-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="RamSukhaDasJi" /><title>2 Quotes From Swami Ramsukhdasji</title><content type="html">1. This "Jeev" even if it receives the highest post or things in this world, then too its hunger will not be satiated till it does not attain the Eternal, its very own Lord, because only God is such, through whom all fulfillment is possible. Besides God, everyone else is incomplete and imperfect.&lt;br /&gt;इस जीव को संसार के किसी भी उच्चे-से- उच्चे पद या पदार्थ की प्राप्ति क्यों न हो जाए, इसकी भूक तब तक नहीं मिटती, जब तक यह अपने परम आत्मीय भगवान् को प्राप्त नहीं कर लेता, क्योंकि भगवान् ही ऐसे हैं जिनसे सब तरह की पूर्ती हो सकती है | उनके सिवा सभी अपूर्ण है | (Jeevan ka Kartavya)&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;2. जिन मन, बुद्धि, इन्द्रियोंको आप वश में नहीं कर सकते हो, अपनेमें एक कमजोरी का अनुभव होता है, वह कमजोरी नहीं रहेगी। आपको आश्चर्य आये, ऐसा बल आ जयगा। काम को जीतने की, लोभ को जीतने की, मोह को जीतने की, मात्सर्य-दोष दूर करनेकी ताकत स्वत: आ जायगी। परन्तु ताकत लेने के लिये स्थित नहीं होना है। इसका विचार ही नहीं करना है कि हमें ताकल लेनी है। केवल चितशक्तिमें, अपने स्वरुपमें स्थित होना है कि मेरे में कोई विकार नहीं है। दिन में दस बार, पन्द्रह बार, बीस बार, पचास बार, सौ बार, दो-दो, तीन-तीन सेकेण्डके लिये भी इसमें स्थित हो जाओ कि हमारे में दोष नहीं है। अपने स्वरुपको सँभाल लो। यह तत्काल सिद्धि देनेवाला योग है। (‘भगवत्प्राप्ति की सुगमता’ पृष्ठ-७ पुस्तक से)&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/U9EwmV_yzCo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/6364903160857020873/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2011/11/2-quotes-from-swami-ramsukhdasji.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/6364903160857020873?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/6364903160857020873?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/U9EwmV_yzCo/2-quotes-from-swami-ramsukhdasji.html" title="2 Quotes From Swami Ramsukhdasji" /><author><name>Tech .NET</name><uri>http://www.blogger.com/profile/04468859847035435763</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2011/11/2-quotes-from-swami-ramsukhdasji.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcHSHc7eSp7ImA9WhRSF00.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-7069169307123485004</id><published>2011-11-19T05:02:00.000-08:00</published><updated>2011-11-19T05:07:19.901-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-19T05:07:19.901-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="meditation" /><title>Meditation Techniques from beginning to end in Hindi</title><content type="html">This video tell about deep meditation. A journey from beginning to end. It tell using 3D models that how easy and simple to meditate.Meditation techniques are easy. For full knowledge of kundalini jagran. Awaken 6th sense. Watch this video. It will tell in scientific way how we are part of universe&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;iframe width="420" height="315" src="http://www.youtube.com/embed/L4thsq2m0ic" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Really this is great video!!!&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/RXLv0OOCdus" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/7069169307123485004/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2011/11/meditation-techniques-from-beginning-to.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/7069169307123485004?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/7069169307123485004?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/RXLv0OOCdus/meditation-techniques-from-beginning-to.html" title="Meditation Techniques from beginning to end in Hindi" /><author><name>Tech .NET</name><uri>http://www.blogger.com/profile/04468859847035435763</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/L4thsq2m0ic/default.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2011/11/meditation-techniques-from-beginning-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIFRXYzeyp7ImA9WhZVFkU.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-2048747873959468118</id><published>2011-05-29T07:28:00.000-07:00</published><updated>2011-05-29T07:48:34.883-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-29T07:48:34.883-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="bhajan" /><category scheme="http://www.blogger.com/atom/ns#" term="music" /><category scheme="http://www.blogger.com/atom/ns#" term="song" /><title>Song: Shambho Shankar Namah Shivaya</title><content type="html">- Avdhoot Baba Shivanand Ji Song&lt;br /&gt;&lt;br /&gt;When you are in great tension or too much tired, Listen this song carefully and look at the pictures and feel weight less. &lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe width="425" height="349" src="http://www.youtube.com/embed/nDwELHvQbNY" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Har Har Mahadev!!!&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/CMb05-TKWOs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/2048747873959468118/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2011/05/song-shambho-shankar-namah-shivaya.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2048747873959468118?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2048747873959468118?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/CMb05-TKWOs/song-shambho-shankar-namah-shivaya.html" title="Song: Shambho Shankar Namah Shivaya" /><author><name>Tech .NET</name><uri>http://www.blogger.com/profile/04468859847035435763</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/nDwELHvQbNY/default.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2011/05/song-shambho-shankar-namah-shivaya.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE4FRno-eyp7ImA9WhdbF0g.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-8966233755316986997</id><published>2010-05-31T19:22:00.000-07:00</published><updated>2011-10-16T01:15:17.453-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-16T01:15:17.453-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title>jQuery Popup on button click instead of link navigation</title><content type="html">See &lt;a href="http://techbrij.com/764/jquery-popup-on-button-click-link"&gt;Here&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/SpJAAc4bEM8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/8966233755316986997/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2010/05/jquery-popup-on-button-click-instead-of.html#comment-form" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/8966233755316986997?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/8966233755316986997?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/SpJAAc4bEM8/jquery-popup-on-button-click-instead-of.html" title="jQuery Popup on button click instead of link navigation" /><author><name>Tech .NET</name><uri>http://www.blogger.com/profile/04468859847035435763</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>6</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2010/05/jquery-popup-on-button-click-instead-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8BR3k_eCp7ImA9WxFWE0g.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-8380206094582075429</id><published>2010-05-31T19:19:00.001-07:00</published><updated>2010-05-31T19:20:56.740-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-31T19:20:56.740-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><title>OOPS Concept in Javascript</title><content type="html">Here is the sample code to show oops concept in javascript.&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;&lt;br /&gt;&amp;lt;script type="text/javascript" &gt;&lt;br /&gt;  //Declare Class&lt;br /&gt;    function myClass() {&lt;br /&gt;        //Member Variable&lt;br /&gt;        this.memberVariable = '';&lt;br /&gt;        //Method&lt;br /&gt;        this.methodTest = function(obj) {&lt;br /&gt;            alert(this.memberVariable + ' ' + obj);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    //Extend Class&lt;br /&gt;    myClass.prototype.newMethodTest = function(obj) {&lt;br /&gt;    &lt;br /&gt;        alert(this.memberVariable + ' ' + obj);&lt;br /&gt;    }&lt;br /&gt;    //Static Method&lt;br /&gt;    myClass.myStaticMethod = function(obj) {&lt;br /&gt;        alert('This is static method with arg '+ obj);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    //derived Class&lt;br /&gt;    derivedClass.prototype = new myClass(); &lt;br /&gt;    function derivedClass() {&lt;br /&gt;        //New member variable&lt;br /&gt;        this.newMemberVariable = '';&lt;br /&gt;        //Override New method&lt;br /&gt;        this.newMethodTest = function() {&lt;br /&gt;            alert('old value' + this.memberVariable + 'new value' + this.newMemberVariable);&lt;br /&gt;        }&lt;br /&gt;     }&lt;br /&gt;    &lt;br /&gt;     &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;    var obj = new derivedClass();&lt;br /&gt;    obj.newMemberVariable = 'New Test';&lt;br /&gt;    obj.memberVariable = 'Old Test';&lt;br /&gt;    obj.newMethodTest();&lt;br /&gt;    obj.methodTest('arg'); &lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;&amp;lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/fTH6mvhqjrs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/8380206094582075429/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2010/05/oops-concept-in-javascript.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/8380206094582075429?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/8380206094582075429?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/fTH6mvhqjrs/oops-concept-in-javascript.html" title="OOPS Concept in Javascript" /><author><name>Tech .NET</name><uri>http://www.blogger.com/profile/04468859847035435763</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2010/05/oops-concept-in-javascript.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cNQn85eSp7ImA9Wx5aFUU.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-7795359507231579241</id><published>2010-05-31T19:11:00.000-07:00</published><updated>2010-11-12T08:58:13.121-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-12T08:58:13.121-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title>Get-Set Radio Button –Checkbox value using jQuery</title><content type="html">See &lt;a href="http://www.techbrij.com/313/jquery-common-operations-on-radio-button-checkbox"&gt;Here&lt;/a&gt;.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/gBukf-e-p7o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/7795359507231579241/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2010/05/get-set-radio-button-checkbox-value.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/7795359507231579241?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/7795359507231579241?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/gBukf-e-p7o/get-set-radio-button-checkbox-value.html" title="Get-Set Radio Button –Checkbox value using jQuery" /><author><name>Tech .NET</name><uri>http://www.blogger.com/profile/04468859847035435763</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2010/05/get-set-radio-button-checkbox-value.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUINSXg8cSp7ImA9Wx5QEEk.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-8810917592102809676</id><published>2010-03-12T07:00:00.000-08:00</published><updated>2010-08-28T17:59:58.679-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-28T17:59:58.679-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="asp.net" /><title>Custom role provider based sitemap navigation in asp.net</title><content type="html">See &lt;a href="http://www.techbrij.com/206/custom-role-provider-based-sitemap-navigation-in-asp-net"&gt;Here.&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/SFl-3FI4hto" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/8810917592102809676/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2010/03/custom-role-provider-sitemap-navigation.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/8810917592102809676?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/8810917592102809676?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/SFl-3FI4hto/custom-role-provider-sitemap-navigation.html" title="Custom role provider based sitemap navigation in asp.net" /><author><name>Tech .NET</name><uri>http://www.blogger.com/profile/04468859847035435763</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2010/03/custom-role-provider-sitemap-navigation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UDRXY4fip7ImA9WxBREE8.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-3837400160843349907</id><published>2009-12-28T09:26:00.000-08:00</published><updated>2009-12-28T09:27:54.836-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-28T09:27:54.836-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Social Networking" /><category scheme="http://www.blogger.com/atom/ns#" term="Blogger" /><title>Add KickIt Badge for DotNetKicks.com in blogger</title><content type="html">We can add KickIt Badge for DotNetKicks in blogger using the &lt;a href="http://www.dotnetkicks.com/docs/kickitbadge" target="_blank" title="DotNetKicks"&gt;javascript&lt;/a&gt;. But, It is loaded after loading all elements even it is in middle of page. Suppose, your page has a lot of ads and links and you have added DotNetKicks javascript below the post then It appears after loading all links/ads/content. Here are the steps to fix this problem without using javascript.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
1. Login to blogger and go to &lt;b&gt;Layout &gt;&gt; Edit HTML&lt;/b&gt;&lt;br /&gt;
2. Check "Expand Widget Templates"&lt;br /&gt;
3. Search &lt;b&gt;&lt;data:post.body/&gt;&lt;/b&gt;&lt;br /&gt;
4. Paste following code after this where you want to place. &lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;&amp;lt;!-- DotNetKicks --&gt;
&amp;lt;a expr:href='&amp;amp;quot;http://www.dotnetkicks.com/kick/?url=&amp;amp;quot; + data:post.url'&gt;
&amp;lt;img border='0' expr:src='&amp;amp;quot;http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=&amp;amp;quot; + data:post.url'/&gt;
&amp;lt;/a&gt;
&lt;/pre&gt;It will load DotNetKicks badge immediately.&lt;br /&gt;
&lt;br /&gt;
Enjoy this.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/XsU6sef0e0k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/3837400160843349907/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/12/kickit-badge-dotnetkicks-blogger.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/3837400160843349907?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/3837400160843349907?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/XsU6sef0e0k/kickit-badge-dotnetkicks-blogger.html" title="Add KickIt Badge for DotNetKicks.com in blogger" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/12/kickit-badge-dotnetkicks-blogger.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYMRXw_eCp7ImA9WxBTFk4.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-7191347191811139577</id><published>2009-12-12T07:53:00.000-08:00</published><updated>2009-12-12T07:53:04.240-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-12T07:53:04.240-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><category scheme="http://www.blogger.com/atom/ns#" term="MOSS 2007" /><title>Active Directory group in  sharepoint</title><content type="html">&lt;b&gt;what is the best approach for assigning permission levels in SharePoint? &lt;/b&gt;&lt;br /&gt;
One recommendation is to use AD groups or SharePoint groups that contain AD groups rather than individuals to control access. It's much easier to clean up AD group membership when an individual leaves than to track down all the places where you've given them individual access (including membership in SharePoint groups).&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a title="AD group sharepoint" href="http://1.bp.blogspot.com/_wczS8QatKXM/SyO3uoUJcAI/AAAAAAAAAIY/RBUBuwHY_zw/s1600-h/AD.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_wczS8QatKXM/SyO3uoUJcAI/AAAAAAAAAIY/RBUBuwHY_zw/s400/AD.JPG" alt="AD Group sharepoint" title="AD Group Sharepoint"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Most Intranet based organizations use Active Directory to manage user profiles and authentication process in the network. In SharePoint, Active Directory has been used to authenticate users and build user profiles using basic personalization features. This means that if the  organization uses Active Directory, SharePoint becomes a great browser-based tool in which to work because a user who logs in to the domain does not typically need to enter credentials again to access a SharePoint site. This is because when the system administrator configured the SharePoint server, it was added as a member of your Active Directory domain. Therefore, when you enter your username and password to connect to the network, the SharePoint environment recognizes you as a member and therefore does not require you to specify your username and password again. In addition, SharePoint allows you to connect to sites based on your site group membership and retains your permissions as you access various other Windows-based systems such as file shares or printers. Most users prefer this type of experience because it can be tedious and confusing to manage both multiple usernames and passwords.&lt;br /&gt;
See &lt;a href="http://urenjoy.blogspot.com/2008/11/use-windows-grouprole-in-moss-2007.html" title="AD Group" target="_blank"&gt;here &lt;/a&gt;how to Add Active Directory Group to sharepoint.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Advantages of Active directory group over sharepoint group:&lt;/b&gt;&lt;br /&gt;
&gt; Members of this group can be managed within Active Directory. Only Active Directory administrators have the permission to modify group memberships. Normally created and maintained by the IT department.&lt;br /&gt;
&gt; AD Groups can be nested - e.g. you can add another AD Group as a member to an existing AD group&lt;br /&gt;
&gt; It can be used across different SharePoint sites and site collections.&lt;br /&gt;
&gt; There is no need of depth knowledge of sharepoint, A network guy can implement this. &lt;br /&gt;
If AD groups are used in sharepoint group then generally it is required to get the sharepoint group for AD User.  You can get all AD groups from a user using following:&lt;br /&gt;
&lt;a href="http://urenjoy.blogspot.com/2009/04/getting-active-directory-groups-from.html" target="_blank"&gt;http://urenjoy.blogspot.com/2009/04/getting-active-directory-groups-from.html&lt;/a&gt; and use the AD Groups as a sharepoint user to get the sharepoint groups for checking role/permissions.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Conclusion:&lt;/b&gt; &lt;br /&gt;
However, in organizations with thousands of users, it’s more realistic to add Active Directory security groups to a SharePoint site group. This not only reduces administrative overhead when you first set up a site, but also means the site’s membership stays up-to-date as new users join or leave the organization. As you add users to the Active Directory security group, they are automatically assigned to the SharePoint site group that has been associated with the security group.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/iVbzwG1NT54" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/7191347191811139577/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/12/active-directory-group-in-sharepoint.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/7191347191811139577?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/7191347191811139577?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/iVbzwG1NT54/active-directory-group-in-sharepoint.html" title="Active Directory group in  sharepoint" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_wczS8QatKXM/SyO3uoUJcAI/AAAAAAAAAIY/RBUBuwHY_zw/s72-c/AD.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/12/active-directory-group-in-sharepoint.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUECSH0_eip7ImA9WxNaGUk.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-2548988158889805395</id><published>2009-12-04T08:18:00.000-08:00</published><updated>2009-12-04T08:21:09.342-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-04T08:21:09.342-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VSTO" /><category scheme="http://www.blogger.com/atom/ns#" term=".Net" /><category scheme="http://www.blogger.com/atom/ns#" term="Office" /><category scheme="http://www.blogger.com/atom/ns#" term="Addin" /><title>How to deploy Office Shared Add-in</title><content type="html">Suppose you have implemented shared add-in using VS 2008 for Office 2007 and now you have to create installation package.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
1. Download and install &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=3E43BF08-5008-4BB6-AA85-93C1D902470E&amp;displaylang=en" target="_blank"&gt; COMShimWizardSetup.exe&lt;/a&gt; and follow &lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/bb508939.aspx" target="_blank"&gt;http://msdn.microsoft.com/en-us/library/bb508939.aspx&lt;/a&gt;&lt;br /&gt;
2. Now Build your setup project and install on another machine. If you face any problem See following:&lt;br /&gt;
&lt;a href="http://blogs.msdn.com/vsod/archive/2008/04/22/Troubleshooting-com-add-in-load-failures.aspx" target="_blank"&gt;http://blogs.msdn.com/vsod/archive/2008/04/22/Troubleshooting-com-add-in-load-failures.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Hope, It helps.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/5xlhGTik_4I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/2548988158889805395/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/12/deploy-office-shared-add-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2548988158889805395?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2548988158889805395?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/5xlhGTik_4I/deploy-office-shared-add-in.html" title="How to deploy Office Shared Add-in" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/12/deploy-office-shared-add-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUENQHwzfyp7ImA9WxNaGUk.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-6503826189165520188</id><published>2009-12-04T08:00:00.000-08:00</published><updated>2009-12-04T08:21:31.287-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-04T08:21:31.287-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VSTO" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><category scheme="http://www.blogger.com/atom/ns#" term=".Net" /><category scheme="http://www.blogger.com/atom/ns#" term="Office" /><category scheme="http://www.blogger.com/atom/ns#" term="Addin" /><title>unable to create specified activex control  Office add-in error</title><content type="html">Add-ins that directly implement &lt;b&gt;ICustomTaskPaneConsumer &lt;/b&gt;expose one or more ActiveX controls that you must register. To use the test add-in for &lt;b&gt;ICustomTaskPaneConsumer&lt;/b&gt;, you can either rebuild the add-in, which registers it, or simply register the add-in assembly that contains the managed ActiveX control. You must also be sure to rebuild or re-register the shim, so that the shim registration overrides the add-in registration.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;pre class="Cpp" name="code"&gt;public class TaskPaneX : Office.ICustomTaskPaneConsumer
{
    private Office.ICTPFactory _taskPaneFactory;
    internal Office.CustomTaskPane _taskPane;
 
    public void CTPFactoryAvailable(Office.ICTPFactory CTPFactoryInst)
    {
        try
        {
            _taskPaneFactory = CTPFactoryInst;
            _taskPane = _taskPaneFactory.CreateCTP(
"ContosoAddin.SimpleControl", "SimpleControl", Type.Missing);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.ToString());
        }
    }
}
&lt;/pre&gt;1. Make sure user control class has Comvisible and ProgID defined. See for above code:&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;[ComVisible(true)]
[ProgId("ContosoAddin.SimpleControl")]
[Guid("918E7B30-E23A-4226-85A2-181ABB514C66")]
public partial class SimpleControl : UserControl
{
    public SimpleControl()
    {
        InitializeComponent();
    }
}
&lt;/pre&gt;&lt;br /&gt;
2. Make sure the managed assembly must be strong name assembly and would be better if shim assembly has same GUID /ProgID.&lt;br /&gt;
3. First register the original shared add-in assembly:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;cd C:\Windows\Microsoft.NET\Framework\v2.0.50727&lt;br /&gt;
regasm /codebase "&amp;lt;install_locationC:\Data\COMShims\2.3\Sample Managed Assemblies\TestExcel2007Addin\TestExcel2007Addin\bin\Debug\TestExcel2007Addin.dll"&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
4. Register shim assembly:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Regsvr32  “&amp;lt;shim assembly path&gt;”&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
5. Test the add-in.&lt;br /&gt;
&lt;br /&gt;
Hope, It helps.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/vkaygSzP1UY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/6503826189165520188/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/12/unable-to-create-specified-activex.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/6503826189165520188?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/6503826189165520188?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/vkaygSzP1UY/unable-to-create-specified-activex.html" title="unable to create specified activex control  Office add-in error" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/12/unable-to-create-specified-activex.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYCRng5cCp7ImA9WxNbGEo.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-8742480442680623375</id><published>2009-11-21T22:09:00.000-08:00</published><updated>2009-11-21T22:09:27.628-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-21T22:09:27.628-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><category scheme="http://www.blogger.com/atom/ns#" term="MOSS 2007" /><title>_spbodyonloadfunctionnames is undefined Javascript Error in sharepoint</title><content type="html">&lt;b&gt;_spBodyOnLoadFunctionNames&lt;/b&gt;: Generally, ASP.NET 2.0 Master page concept is used for sharepoint pages and the “body ” is defined in master page. So, the content page is not able to add function to the body’s onload event directly.  In order to work around this limitation, SharePoint provides the “_spBodyOnLoadFunctionNames” array. When the body is loaded, the onload event handler executes each function whose name is contained in this array. We added “myFunction” to the array so that it would run when the body’s onload event fires. &lt;br /&gt;
&lt;b&gt;_spBodyOnLoadFunctionNames.push("myFunction ");&lt;/b&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
To fix the javascript error: View source of sharepoint page from browser.&lt;br /&gt;
1. Make sure in the head tag, init.js is included.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;lt;script type="text/javascript" language="javascript" src="/_layouts/1033/init.js?rev=VhAxGc3rkK79RM90tibDzw%3D%3D"&gt;&amp;lt;/script&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
2. Body onload is properly defined.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;lt;BODY scroll="yes" onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();"&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If these are not defined then it causes javascript error.&lt;br /&gt;
Hope, It helps.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/jfZR8ReNRL4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/8742480442680623375/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/11/spbodyonloadfunctionnames-is-undefined.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/8742480442680623375?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/8742480442680623375?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/jfZR8ReNRL4/spbodyonloadfunctionnames-is-undefined.html" title="_spbodyonloadfunctionnames is undefined Javascript Error in sharepoint" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/11/spbodyonloadfunctionnames-is-undefined.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUIFQ3c9eip7ImA9WxBREEw.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-2291575536731239064</id><published>2009-10-28T07:54:00.000-07:00</published><updated>2009-12-28T08:25:12.962-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-28T08:25:12.962-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Webservice" /><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C" /><title>Pass parameters to web-service with image uploading in iphone</title><content type="html">When you upload a file you are really posting a form's content to the browser by using a different encoding type (enctype) in your form. That encoding is specified as enctype="multipart/form-data" as an attribute of your form.&lt;br /&gt;
The specification in RFC 1867 "Form-based File Upload in HTML" describes the mechanism by which a file may be uploaded from a Web browser to the server.&lt;br /&gt;
There are a lot of articles to pass image to webservice. but, I require to pass some parameters with image.  &lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
Suppose I need to pass following parameters with image:&lt;br /&gt;
Parameter1&lt;br /&gt;
tag&lt;br /&gt;
status&lt;br /&gt;
customerID&lt;br /&gt;
customerName&lt;br /&gt;
&lt;br /&gt;
Then following should be posted:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
-----------------------------14737809831466499882746641449&lt;br /&gt;
Content-Disposition: form-data; name="parameter1"&lt;br /&gt;
&lt;br /&gt;
MyValue1&lt;br /&gt;
-----------------------------14737809831466499882746641449&lt;br /&gt;
Content-Disposition: form-data; name="tag"&lt;br /&gt;
&lt;br /&gt;
MyTags&lt;br /&gt;
-----------------------------14737809831466499882746641449&lt;br /&gt;
Content-Disposition: form-data; name="status"&lt;br /&gt;
&lt;br /&gt;
1&lt;br /&gt;
-----------------------------14737809831466499882746641449&lt;br /&gt;
Content-Disposition: form-data; name="customerID"&lt;br /&gt;
&lt;br /&gt;
B115B57A-23D3-56BC-B457-860BFDA83AB3&lt;br /&gt;
-----------------------------14737809831466499882746641449&lt;br /&gt;
Content-Disposition: form-data; name="customerName"&lt;br /&gt;
&lt;br /&gt;
MyName 007&lt;br /&gt;
-----------------------------14737809831466499882746641449&lt;br /&gt;
Content-Disposition: form-data; name="image"; filename="20091228144754.jpg"&lt;br /&gt;
Content-Type: application/octet-stream&lt;br /&gt;
&lt;br /&gt;
(Binary Content)&lt;br /&gt;
-----------------------------14737809831466499882746641449--&lt;br /&gt;
&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
Format:&lt;br /&gt;
For normal input:&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&amp;lt;hex value&gt;CRLFContent-Disposition: form-data; name="&amp;lt;input&lt;br /&gt;
name&gt;"CRLFCRLF&amp;lt;input value&gt;CRLF&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
For file type input:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;lt;hex value&gt;CRLFContent-Disposition: form-data; name="&amp;lt;input&lt;br /&gt;
name&gt;"; filename="&amp;lt;file&lt;br /&gt;
path&gt;"CRLFContent-Type: &amp;lt;mime-type&gt;CRLFCRLF&amp;lt;input&lt;br /&gt;
value&gt;CRLF&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;iPhone Implementation:&lt;/b&gt;&lt;br /&gt;
We will pass the parameters in the above format. For this:&lt;br /&gt;
1.  All the text like -----------------------------14737809831466499882746641449 is what separates each input.&lt;br /&gt;
2. Note also that in the end of the post we also have the text -----------------------------14737809831466499882746641449-- but it signals the end of our post, since it&lt;b&gt; ends with 2 minus signs (--).&lt;/b&gt; Anyway, don't forget that this strange.&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;// setting up the request object now
 NSURL *nsurl =[NSURL URLWithString:urlString];
 NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:nsurl cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; 
 [request setURL:nsurl];
 [request setHTTPMethod:@"POST"];


NSString *boundary = [NSString stringWithString:@"---------------------------14737809831466499882746641449"];
 NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary];
 [request addValue:contentType forHTTPHeaderField: @"Content-Type"];
 
 /*
  now lets create the body of the post
  */
 NSMutableData *body = [NSMutableData data];
 
 //parameter1
 [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; 
 [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"parameter1\"\r\n\r\n%@", parameter1] dataUsingEncoding:NSUTF8StringEncoding]];
 [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
 //Tags
 [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"tag\"\r\n\r\n%@", tag] dataUsingEncoding:NSUTF8StringEncoding]];
 [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
 //Status
 [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"status\"\r\n\r\n%@", status] dataUsingEncoding:NSUTF8StringEncoding]];
 [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
 //customerID
 [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"customerID\"\r\n\r\n%@", customerID] dataUsingEncoding:NSUTF8StringEncoding]];
 [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
 //customerName
 [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"customerName\"\r\n\r\n%@", customerName] dataUsingEncoding:NSUTF8StringEncoding]];
 [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
 //Image
 [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"image\"; filename=\"%@\"\r\n",[fileName text]] dataUsingEncoding:NSUTF8StringEncoding]];
 [body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
 [body appendData:[NSData dataWithData:imageData]];
 [body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
 
 // setting the body of the post to the reqeust
 [request setHTTPBody:body];
 
NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
 
&lt;/pre&gt;Hope, It helps.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/yMs-aKErqI8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/2291575536731239064/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/12/pass-parameter-web-service-image-upload.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2291575536731239064?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2291575536731239064?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/yMs-aKErqI8/pass-parameter-web-service-image-upload.html" title="Pass parameters to web-service with image uploading in iphone" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/12/pass-parameter-web-service-image-upload.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YBRX05fSp7ImA9WxNUEEo.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-1487222344497627390</id><published>2009-10-03T22:57:00.000-07:00</published><updated>2009-11-01T02:25:54.325-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-01T02:25:54.325-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><category scheme="http://www.blogger.com/atom/ns#" term=".Net" /><category scheme="http://www.blogger.com/atom/ns#" term="Office" /><title>Get Custom Document Properties / Document Information Panel Values using C#</title><content type="html">&lt;span style="font-weight:bold;"&gt;Object:&lt;/span&gt; To retrieve custom document properties of office documents using C#.&lt;br /&gt;
Generally, it is required to get or set custom document properties programmatically. For example, when document is checked out from sharepoint server then document information panel shows server properties. Our object is to modify the properties using C# in word.  But problem is document type. Before office 2007, the document is binary file and in Office 2007, it is compressed XML file.   Here is the sample code to do this. In the code, all the properties name are passed as hashtable keys.  &lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;//Collection of all column Names
Hashtable ht = new Hashtable();
//Collection of name and values of custom document properties
List&amp;lt;ListItem&gt; lstTags = new List&amp;lt;ListItem&gt;();
//Active Document
Microsoft.Office.Interop.Word.Document objDoc;

void LoadValuesFromDocuments(Hashtable ht)
{
//Office 2007 Documents
if (objDoc.Name.ToLower().EndsWith("docx"))
{
//Load Document Information Panel
XmlDocument InfoPathXML = new XmlDocument();
InfoPathXML.LoadXml(objDoc.CustomXMLParts[4].XML);
//Log("XML: "+ Doc.CustomXMLParts[4].XML);
foreach (string str in ht.Keys)
{
try
{
ListItem lstItem = new ListItem();
lstItem.Text = str;
lstItem.Value = InfoPathXML.SelectSingleNode("//*[local-name(.)='" + ht[str].ToString() + "']").InnerText;
lstTags.Add(lstItem);
}
catch (Exception ex)
{
Log(ex.ToString());
}
}
}
else            //Old Documents
{
foreach (string str in ht.Keys)
{
try
{
ListItem lstItem = new ListItem();
lstItem.Text = str;
lstItem.Value = ((DocumentProperties)objDoc.CustomDocumentProperties)[str].Value.ToString();
lstTags.Add(lstItem);
}
catch (Exception ex)
{ Log(ex.ToString()); }

}

}
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
To set values for older version documents (NOT Office 2007 docs)&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;
try
{                   
((DocumentProperties)objDoc.CustomDocumentProperties)[fieldName].Value = fieldValue;                   
// Add and Remove sample text to indicate msword that the document is modified so that It will pass 
// DIP info to sharepoint even there is no change in content.
object startPosition = 0;
object endPosition = 0;                    
Range r = objDoc.Range(ref startPosition, ref endPosition);
r.InsertAfter("this is test.");
object unit = Microsoft.Office.Interop.Word.WdUnits.wdCharacter;
object count = 1;
r.Delete(ref unit, ref count);
}
catch (Exception ex)
{
Log(ex.ToString());                  
}
&lt;/pre&gt;&lt;br /&gt;
Hope! It helps.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/kbZfTKGK9BY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/1487222344497627390/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/10/get-custom-document-properties-office-c.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/1487222344497627390?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/1487222344497627390?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/kbZfTKGK9BY/get-custom-document-properties-office-c.html" title="Get Custom Document Properties / Document Information Panel Values using C#" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/10/get-custom-document-properties-office-c.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAFSHsyeyp7ImA9WxNaGUk.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-3838152688120962941</id><published>2009-10-03T22:43:00.000-07:00</published><updated>2009-12-04T08:21:59.593-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-04T08:21:59.593-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VSTO" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><category scheme="http://www.blogger.com/atom/ns#" term=".Net" /><category scheme="http://www.blogger.com/atom/ns#" term="Office" /><category scheme="http://www.blogger.com/atom/ns#" term="Addin" /><title>Managing custom task panes across multiple documents in shared add in for office 2007 using .NET</title><content type="html">I see a lot of articles on this topic but all are related to VSTO. But I required this for shared addin. I followed MSDN to create custom task pane using shared addin. It works fine but when multiple documents are opened then it appears only for the first document. I have implemented to show &lt;span style="font-weight:bold;"&gt;document wise custom task pane&lt;/span&gt;.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;using MSword = Microsoft.Office.Interop.Word;
public class Connect : Object, Extensibility.IDTExtensibility2,  ICustomTaskPaneConsumer 
{
public Connect()
{
}
public void OnConnection(object application, Extensibility.ext_ConnectMode connectMode, object addInInst, ref System.Array custom)
{
applicationObject = (MSword.Application)application;
addInInstance = addInInst;

}
public void OnStartupComplete(ref System.Array custom)
{
applicationObject.DocumentOpen += new Microsoft.Office.Interop.Word.ApplicationEvents4_DocumentOpenEventHandler(applicationObject_DocumentOpen);
applicationObject.WindowActivate += new Microsoft.Office.Interop.Word.ApplicationEvents4_WindowActivateEventHandler(applicationObject_WindowActivate); 
}
void applicationObject_DocumentOpen(Microsoft.Office.Interop.Word.Document Doc)
{   
AddCustomTaskPane();             
}
void applicationObject_WindowActivate(Microsoft.Office.Interop.Word.Document Doc, Microsoft.Office.Interop.Word.Window Wn)
{
}
public void OnBeginShutdown(ref System.Array custom)
{
}
public void OnDisconnection(Extensibility.ext_DisconnectMode disconnectMode, ref System.Array custom)
{
}
public void OnAddInsUpdate(ref System.Array custom)
{
}
private MSword.Application applicationObject;
private object addInInstance;        

#region ICustomTaskPaneConsumer Members
ICTPFactory ctpFactory;
object missing = Type.Missing;


public void CTPFactoryAvailable(ICTPFactory CTPFactoryInst)
{
ctpFactory = CTPFactoryInst;
AddCustomTaskPane(); 
}
public void AddCustomTaskPane()
{
CustomTaskPane CTP = ctpFactory.CreateCTP("MyNameSpace.MyUserControl", "My Task Pane", missing);
MyUserControl sampleAX = (MyUserControl)CTP.ContentControl;               
CTP.Visible = true;        
}


#endregion
}
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/b5_xWsMRNus" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/3838152688120962941/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/10/custom-task-panes-multiple-documents.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/3838152688120962941?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/3838152688120962941?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/b5_xWsMRNus/custom-task-panes-multiple-documents.html" title="Managing custom task panes across multiple documents in shared add in for office 2007 using .NET" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/10/custom-task-panes-multiple-documents.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMHSHc9cSp7ImA9WxFbE0k.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-9052809359436680757</id><published>2009-08-19T21:55:00.000-07:00</published><updated>2010-07-05T09:47:19.969-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-05T09:47:19.969-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="asp.net" /><category scheme="http://www.blogger.com/atom/ns#" term="VS" /><category scheme="http://www.blogger.com/atom/ns#" term=".Net" /><title>Database Installation using VS setup</title><content type="html">Database installation is common task in setup programming.&lt;a href="http://www.techbrij.com/145/install-sql-server-database-with-visual-studio-setup"&gt;Here &lt;/a&gt;are the steps to install sql server database with setup using custom action. the summary is following&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;1. create a text file that contains a SQL statement to create a database, Tables, functions and stored procedures&lt;br /&gt;2. Add installer class to execute sql statements&lt;br /&gt;3. Create deployment project for Primary output for the Existing project.&lt;br /&gt;4. Create custom installation dialog for database server.&lt;br /&gt;5. Create custom action for installing database, build setup project and install it.&lt;br /&gt;&lt;br /&gt;For more details, See &lt;a href="http://www.techbrij.com/145/install-sql-server-database-with-visual-studio-setup"&gt;here&lt;/a&gt;.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/mZ51dxyFMRo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/9052809359436680757/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/08/database-installation-vs-setup-custom.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/9052809359436680757?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/9052809359436680757?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/mZ51dxyFMRo/database-installation-vs-setup-custom.html" title="Database Installation using VS setup" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/08/database-installation-vs-setup-custom.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0AAQXYzeip7ImA9WxNUEEo.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-2453883470938986552</id><published>2009-08-19T04:27:00.000-07:00</published><updated>2009-11-01T02:35:40.882-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-01T02:35:40.882-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VSeWSS" /><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><category scheme="http://www.blogger.com/atom/ns#" term="MOSS 2007" /><title>Add/Remove Assembly to WSP (VSEWSS)</title><content type="html">I was facing a problem to add an assembly in VSEWSS generated WSP. I added assembly in “manifest.xml” but it is refreshed during packaging. I added assembly in VS but it was not included in WSP. There is no direct way to access ddf in VSEWSS. At Last, I got solution:&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
1. Add reference &gt; Select Assembly &gt; OK&lt;br /&gt;
2. Right click of Assembly &gt; Properties&lt;br /&gt;
3. Set “&lt;span style="font-weight:bold;"&gt;Copy Local&lt;/span&gt;” property = &lt;span style="font-weight:bold;"&gt;true&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"  title="vsewss-wsp-dll" href="http://3.bp.blogspot.com/_wczS8QatKXM/SoviLCy1xBI/AAAAAAAAAHk/uZCL9tTr3Lk/s1600-h/vsewss-wsp-dll.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 265px; height: 299px;" src="http://3.bp.blogspot.com/_wczS8QatKXM/SoviLCy1xBI/AAAAAAAAAHk/uZCL9tTr3Lk/s400/vsewss-wsp-dll.JPG" border="0" alt="vsewss-wsp-dll" title="vsewss-wsp-dll" id="BLOGGER_PHOTO_ID_5371635659925996562" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
4. Deploy Solution&lt;br /&gt;
Now, you will get assembly in WSP. You can see by renaming wsp to cab and open cab file.&lt;br /&gt;
To &lt;span style="font-weight:bold;"&gt;Remove &lt;/span&gt;assembly from WSP, Perform same steps and set &lt;span style="font-weight:bold;"&gt;“Copy Local” property = false&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
Hope! You will enjoy it.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/KEwlLuOBy-A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/2453883470938986552/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/08/add-assembly-wsp-vsewss.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2453883470938986552?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2453883470938986552?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/KEwlLuOBy-A/add-assembly-wsp-vsewss.html" title="Add/Remove Assembly to WSP (VSEWSS)" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_wczS8QatKXM/SoviLCy1xBI/AAAAAAAAAHk/uZCL9tTr3Lk/s72-c/vsewss-wsp-dll.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/08/add-assembly-wsp-vsewss.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04HRn4_eip7ImA9Wx5QEU4.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-2545512832204968266</id><published>2009-08-06T21:59:00.000-07:00</published><updated>2010-08-29T18:32:17.042-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-29T18:32:17.042-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="asp.net" /><category scheme="http://www.blogger.com/atom/ns#" term=".Net" /><title>Display Hierarchical Data with TreeView in ASP.NET</title><content type="html">See &lt;a href="http://www.techbrij.com/225/display-hierarchical-data-with-treeview-in-asp-net"&gt;Here&lt;/a&gt;.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/BfY-_BFcQvY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/2545512832204968266/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/08/display-hierarchical-data-with-treeview.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2545512832204968266?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2545512832204968266?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/BfY-_BFcQvY/display-hierarchical-data-with-treeview.html" title="Display Hierarchical Data with TreeView in ASP.NET" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/08/display-hierarchical-data-with-treeview.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcAQnw8fip7ImA9WxBREUQ.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-2646677193761477968</id><published>2009-07-30T09:11:00.000-07:00</published><updated>2009-12-30T09:27:23.276-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-30T09:27:23.276-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C" /><title>Dynamic multiline label with custom font in UITableViewController</title><content type="html">Suppose you need to show long text in tableview cell with custom font then height is the major issue. See following steps to do this:&lt;br /&gt;
1. Download FontLabel app source from &lt;br /&gt;
&lt;a href="http://github.com/zynga/FontLabel" target="_blank"&gt;http://github.com/zynga/FontLabel&lt;/a&gt;&lt;br /&gt;
It has a good library with sample to use custom fonts embedded with project. Add FontLabel library to your project.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
2. See following to generate label with custom font dynamically.&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;#define CELL_CONTENT_WIDTH 320.0f
#define CELL_CONTENT_MARGIN 10.0f

//Create Label with specific font, size and text on specific x,y.
- (FontLabel *)getLabel:(CGFloat)x :(CGFloat )y :(NSString *)fontName :(CGFloat )fontSize :(NSString *)text
{
 CGSize constraint = CGSizeMake(CELL_CONTENT_WIDTH - (CELL_CONTENT_MARGIN+x), 20000.0f);
    
    CGSize size = [text sizeWithFont:[UIFont systemFontOfSize:fontSize] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap];
    
 
 
 FontLabel *lbl =[[FontLabel alloc] initWithFrame:CGRectMake(x, y, CELL_CONTENT_WIDTH- (CELL_CONTENT_MARGIN+x), size.height)
            fontName:fontName pointSize:fontSize];
 lbl.textColor = [UIColor blackColor];
 lbl.text = text;
 lbl.numberOfLines = 0;
 //lbl.textAlignment = UITextAlignmentLeft;
 lbl.lineBreakMode = UILineBreakModeWordWrap;
 lbl.baselineAdjustment = UIBaselineAdjustmentNone;  
 [lbl sizeToFit];
 return lbl;
}
&lt;/pre&gt;3.You can add labels in tableview cell using &lt;b&gt;cellForRowAtIndexPath &lt;/b&gt;method &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;lblID = [self getLabel:CELL_CONTENT_MARGIN :CELL_CONTENT_MARGIN :@"angelina" :24.0f :title];&lt;br /&gt;
[cell addSubview: lblID];&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
4. We need to set tableview cell height according to multiline label height. See following for this:&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
{
    
 FontLabel *lbl = [[self getLabelFromIndex:indexPath] retain];
 CGSize constraint = CGSizeMake(CELL_CONTENT_WIDTH - (CELL_CONTENT_MARGIN * 2), 20000.0f);
    
    CGSize size = [lbl.text sizeWithFont:lbl.font constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap];
    
    CGFloat height = size.height;
    
  
    return height + (CELL_CONTENT_MARGIN * 2);
 
}
&lt;/pre&gt;where getLabelFromIndex returns label of the cell.&lt;br /&gt;
&lt;br /&gt;
Hope, It helps.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/RYIOPGOnb_8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/2646677193761477968/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/07/dynamic-multiline-label-custom-font.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2646677193761477968?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2646677193761477968?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/RYIOPGOnb_8/dynamic-multiline-label-custom-font.html" title="Dynamic multiline label with custom font in UITableViewController" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/07/dynamic-multiline-label-custom-font.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8FRXg6eCp7ImA9WxBREUQ.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-4267100724744362008</id><published>2009-07-30T09:01:00.000-07:00</published><updated>2009-12-30T09:06:54.610-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-30T09:06:54.610-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C" /><title>Show UIImagePickerController from UITableViewController in iPhone</title><content type="html">Suppose you need to show UIImagePickerController on cell click of UITableViewController class. Then&lt;br /&gt;
1. define UIImagePickerControllerDelegate in the header class.&lt;br /&gt;
2. Put following code for the cell index of didSelectRowAtIndexPath method&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;imgPicker = [[UIImagePickerController alloc] init];
    imgPicker.allowsImageEditing = NO;
    imgPicker.delegate = self; 
    imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
    imgPicker.navigationBar.tintColor =  self.navigationController.navigationBar.tintColor;
    imgPicker.navigationBar.barStyle =self.navigationController.navigationBar.barStyle; 
    [self.navigationController presentModalViewController:imgPicker animated:YES];
&lt;/pre&gt;To return from image picker&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)img editingInfo:(NSDictionary *)editInfo {
  
 
... Perform operation on selected image ...

 [[picker parentViewController]  dismissModalViewControllerAnimated:YES];
 

}
&lt;/pre&gt;Hope, it helps.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/tXjyDdW7bBQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/4267100724744362008/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/07/uiimagepickercontroller.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/4267100724744362008?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/4267100724744362008?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/tXjyDdW7bBQ/uiimagepickercontroller.html" title="Show UIImagePickerController from UITableViewController in iPhone" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/07/uiimagepickercontroller.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQFRns8fyp7ImA9WxBREUQ.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-5069771170220416335</id><published>2009-07-30T08:47:00.000-07:00</published><updated>2009-12-30T08:58:37.577-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-30T08:58:37.577-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C" /><title>Resize Image to scale for a given max dimension in iphone</title><content type="html">Generally , It is required to resize image for a given max size. the ratio of the image width and height is called Aspect ratio. If resized image aspect ratio is different from original image then it is distorted. So, It is required to resize the image in such a way that it must be in the given max size keeping same aspect ratio.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;Suppose our image object is selImage to be resized in iPhone app. See following code for this:&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;CGFloat newWidth = selImage.size.width;
 CGFloat newHeight = selImage.size.height;
 CGFloat maxWidth = [[dict valueForKey:@"MaxWidth"] floatValue];
 CGFloat maxHeight = [[dict valueForKey:@"MaxHeight"] floatValue]; 
 
 
 //Scale the Image
 CGFloat scale = 0.0;
 
 if (newWidth &gt; maxWidth || newHeight &gt; maxHeight)
 {
  if (maxWidth/newWidth &amp;lt; maxHeight/newHeight)
  {
   scale = maxWidth/newWidth;
  }
  else
  {
   scale = maxHeight/newHeight;
  }
  newWidth = newWidth*scale;
  newHeight = newHeight*scale;
  
 }
 
selImage = [self resizedImage:selImage Rect:CGRectMake(0.0, 0.0, newWidth, newHeight)];

- (UIImage *) resizedImage:(UIImage *)inImage Rect:(CGRect)thumbRect
{

 UIGraphicsBeginImageContext(thumbRect.size);
 [inImage drawInRect:thumbRect];
 UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
 UIGraphicsEndImageContext();
 return newImage;
}

&lt;/pre&gt;&lt;br /&gt;
Hope, It helps.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/OxIwz9VCFIk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/5069771170220416335/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/07/resize-image-scale-iphone.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/5069771170220416335?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/5069771170220416335?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/OxIwz9VCFIk/resize-image-scale-iphone.html" title="Resize Image to scale for a given max dimension in iphone" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/07/resize-image-scale-iphone.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08HQn0zeip7ImA9WxNUEEo.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-6111031861929429070</id><published>2009-07-28T02:12:00.000-07:00</published><updated>2009-11-01T02:37:13.382-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-01T02:37:13.382-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="asp.net" /><category scheme="http://www.blogger.com/atom/ns#" term=".Net" /><title>Search Engine style paging in asp.net(C#)</title><content type="html">When a large number of records are to be displayed and total number of records is variable in nature then search engine style paging is the best approach. For a search query, we need to pass start record number and page size for paging. In the most search engine, the start index is passed using querystring.&lt;br /&gt;
See following, Google uses “start” query string parameter.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"  title="Google Paging" href="http://3.bp.blogspot.com/_wczS8QatKXM/Sm7Bqt7IHAI/AAAAAAAAAHc/6Uo-zt1lfnM/s1600-h/Google+Paging.JPG"&gt;&lt;img  title="Google Paging" style="cursor:pointer; cursor:hand;width: 400px; height: 117px;" src="http://3.bp.blogspot.com/_wczS8QatKXM/Sm7Bqt7IHAI/AAAAAAAAAHc/6Uo-zt1lfnM/s400/Google+Paging.JPG" border="0" alt="google paging" id="BLOGGER_PHOTO_ID_5363437145871096834" /&gt;&lt;/a&gt;&lt;br /&gt;
To create search engine style pagination in asp.net, see following method.  It takes 3 parameters:&lt;br /&gt;
1. totalRecords&lt;br /&gt;
2. pageSize&lt;br /&gt;
3. totalNumericLinks : total number of numeric links. It is 20 in above image.&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;string GetPaging(int totalRecords, int pageSize, int totalNumericLinks)
{
if (totalRecords &amp;lt;= pageSize)
{
return "";
}

StringBuilder str = new StringBuilder();
//Get Total no of pages
int totalPages = totalRecords / pageSize + (totalRecords % pageSize &gt; 0 ? 1 : 0);
//Get Current Page no
int currentPageNo = 1;
string pageUrl = Context.Request.Url.AbsolutePath;    
if (Context.Request.QueryString["start"] != null)
{
currentPageNo = 1 + (Convert.ToInt32(Context.Request.QueryString["start"]) - 1) / pageSize;           
}

//Add previous button
if (currentPageNo &gt; 1)
{
str.Append(string.Format("&amp;nbsp;&amp;lt;a  href=\"" + pageUrl + "?start={0}\" title=\"Previous page\"&gt;&amp;lt;Prev&amp;lt;/a&gt;", (currentPageNo - 2)*pageSize + 1));
}
//Add Numeric link
int sp, ep;
if (totalNumericLinks &gt;= totalPages)
{
sp = 1;
ep = totalPages;
}
else
{
if (currentPageNo - totalNumericLinks / 2 &gt; 0)
{                    
ep = (currentPageNo + totalNumericLinks / 2 - (totalNumericLinks-1)%2);
ep = ep &amp;lt; totalPages ? ep : totalPages;
}
else
{                  
ep = totalNumericLinks;
}
sp = ep - totalNumericLinks+1 &gt; 0?ep - totalNumericLinks+1:1;
}
for (int p = sp; p &amp;lt;= ep; p++)
{
//For Current Page, No Link, Bold Text  
if (p == currentPageNo)
{
str.Append(String.Format("&amp;nbsp;&amp;lt;b&gt;{0}&amp;lt;/b&gt;", p.ToString()));
}
else
{
str.Append(String.Format("&amp;nbsp;&amp;lt;a href=\"" + pageUrl + "?start={1}\" title=\"{0}\"&gt;{0}&amp;lt;/a&gt;&amp;nbsp;", p, (p - 1) * pageSize + 1));
}
}
//Add Next button
if (currentPageNo &amp;lt; totalPages)
{
str.Append(String.Format("&amp;nbsp;&amp;lt;a href=\"" + pageUrl + "?start={0}\" title=\"Next page\"&gt;Next&amp;gt;&amp;lt;/a&gt;", (currentPageNo * pageSize +1).ToString()));
}

return str.ToString(); 

}
&lt;/pre&gt;&lt;br /&gt;
Hope ! It helps.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/wCWIwcUHDxo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/6111031861929429070/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/07/search-engine-style-paging-in-aspnetc.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/6111031861929429070?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/6111031861929429070?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/wCWIwcUHDxo/search-engine-style-paging-in-aspnetc.html" title="Search Engine style paging in asp.net(C#)" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_wczS8QatKXM/Sm7Bqt7IHAI/AAAAAAAAAHc/6Uo-zt1lfnM/s72-c/Google+Paging.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/07/search-engine-style-paging-in-aspnetc.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQNR3k-eyp7ImA9WxBSF0g.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-2026753619243803021</id><published>2009-07-25T07:44:00.000-07:00</published><updated>2009-12-25T07:53:16.753-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-25T07:53:16.753-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C" /><title>Reload Table View with different values iPhone</title><content type="html">Sometimes, It is required to use same tableviewcontroller multiple times with different parameters. For example, in a game, we need to show same screen with different elements. Here, our object is to reuse UITableViewController with different parameters and it will be happened on navigation next button click.&lt;br /&gt;
Here are the simple steps to do this:&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
1. Declare all parameters which make changes in tableview in AppDelegate class.&lt;br /&gt;
2. Load all parameters/Data sources in &lt;b&gt;applicationDidFinishLaunching &lt;/b&gt;method.&lt;br /&gt;
3. Add a UITableViewController class and add all required controls, methods and properties.&lt;br /&gt;
4. In init method of UITableViewController initialize appDelegate class object to access the parameters.&lt;br /&gt;
5. Now in following method loads control with the appDelegate's parameters value and add it in the cell view.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {&lt;br /&gt;
&lt;br /&gt;
...... Setup the cell ......&lt;br /&gt;
&lt;br /&gt;
}&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
6. Process and  Call &lt;b&gt;[self loadView];&lt;/b&gt; where you want to reload data with changes.&lt;br /&gt;
&lt;br /&gt;
Suppose you need to set tableview according NSMutableArray and On next click, you need to show next element of NSMutableArray.&lt;br /&gt;
Then declare &lt;b&gt;index &lt;/b&gt;parameter in AppDelegate class and use it in cellForRowAtIndexPath method. On next click, Increment the index value and reload using  &lt;b&gt;[self loadView];&lt;/b&gt; It will call &lt;b&gt;cellForRowAtIndexPath &lt;/b&gt;again for the next value.&lt;br /&gt;
&lt;br /&gt;
Hope, It helps.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/E0WiPAKFULo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/2026753619243803021/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/07/reload-table-view-with-different-values.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2026753619243803021?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/2026753619243803021?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/E0WiPAKFULo/reload-table-view-with-different-values.html" title="Reload Table View with different values iPhone" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/07/reload-table-view-with-different-values.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08DQ3s4fyp7ImA9WxNUEEo.&quot;"><id>tag:blogger.com,1999:blog-6119656860272079952.post-9175009657086871807</id><published>2009-07-24T22:48:00.000-07:00</published><updated>2009-11-01T02:37:52.537-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-01T02:37:52.537-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><title>Set div’s all anchor tags onclick event using javascript</title><content type="html">Here is an example to set all child anchor tags onclick event.&lt;br /&gt;
A div (id str1) has 3 anchor tags (First, Second and Third). When user clicks on any link, it should call “ShowValue” javascript method which displays text of that link. We have to set onclick event dynamically using javascript. See following for this:&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;pre class="Cpp" name="code"&gt;&amp;lt;script type="text/javascript" &gt;
function SetThis(anc)
{    
var s = document.getElementById(anc).getElementsByTagName("a");   
for (var i=0;i&amp;lt;s.length;i++)
{
s[i].onclick = Function("ShowValue('"+s[i].innerText+"')");     
}          
}
function ShowValue(atag)
{   
alert(atag); 
}     
&amp;lt;/script&gt;
&amp;lt;div id= "str1"&gt;
&amp;lt;a href="javascript: void(0)"&gt;First&amp;lt;/a&gt;&amp;lt;br/&gt;
&amp;lt;a href="javascript: void(0)"&gt;Second&amp;lt;/a&gt;&amp;lt;br/&gt;
&amp;lt;a href="javascript: void(0)"&gt;Third&amp;lt;/a&gt;&amp;lt;br/&gt;
&amp;lt;/div&gt;
&amp;lt;script type="text/javascript"&gt;
SetThis('str1'); 
&amp;lt;/script&gt;
&lt;/pre&gt;&lt;br /&gt;
In the code I used &lt;br /&gt;
&lt;span style="font-weight:bold;"&gt;s[i].onclick = Function("ShowValue('"+s[i].innerText+"')");    &lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
Suppose If I use &lt;br /&gt;
&lt;span style="font-weight:bold;"&gt;s[i].onclick = ShowValue(s[i].innerText);&lt;/span&gt;&lt;br /&gt;
It is executed immediately and on page load, ‘First’ is displayed. But onclick, “Object expected” error is thrown.&lt;br /&gt;
If I use&lt;br /&gt;
&lt;span style="font-weight:bold;"&gt;s[i].onclick =function(){ ShowValue(s[i].innerText)};&lt;/span&gt;&lt;br /&gt;
In this case, We get error:&lt;br /&gt;
“’s[…].innerText’ is null or not an object”&lt;br /&gt;
So &lt;span style="font-weight:bold;"&gt;s[i].onclick = Function("ShowValue('"+s[i].innerText+"')");&lt;/span&gt; works perfect.    &lt;br /&gt;
Hope, It helps.&lt;img src="http://feeds.feedburner.com/~r/urenjoy/~4/MkbDbnAjqWA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://urenjoy.blogspot.com/feeds/9175009657086871807/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://urenjoy.blogspot.com/2009/07/set-divs-all-anchor-tags-onclick-event.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/9175009657086871807?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6119656860272079952/posts/default/9175009657086871807?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/urenjoy/~3/MkbDbnAjqWA/set-divs-all-anchor-tags-onclick-event.html" title="Set div’s all anchor tags onclick event using javascript" /><author><name>.NET Dev</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://urenjoy.blogspot.com/2009/07/set-divs-all-anchor-tags-onclick-event.html</feedburner:origLink></entry></feed>
