Geeks With Blogs
Gaurav Taneja Great dreams... never even get out of the box. It takes an uncommon amount of guts to put your dreams on the line, to hold them up and say, "How good or how bad am I?" That's where courage comes in. January 2007 Entries
Removing parser error inXML

<![CDATA[ your value ]]>  ******* append this in stringbuilder

 

link

http://www.xml.com/pub/a/2003/01/29/qa.html

Posted On Tuesday, January 30, 2007 12:27 PM

Downloading webservice with wsdl
this.EnableViewState = false; HttpContext.Current.Respons... = System.Text.Encoding.UTF8; HttpContext.Current.Respons... = "text/XML"; HttpContext.Current.Respons... HttpWebRequest request = (HttpWebRequest)WebRequest.... // change the url request.Credentials=new NetworkCredential("sample name","password","domain"); HttpWebResponse response = (HttpWebResponse)request.Ge... (); Stream ......

Posted On Monday, January 29, 2007 8:01 AM

How to save a file on client side
How to save a file on client side? create an asp page "Download.aspx" In Design side just have <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Download.aspx.cs" Inherits="Download" ContentType="Text/xml" %> Code on CS side ********** string strFile= ""; if (Request.QueryString.HasKey... { if ((Request.QueryString["vid"] != null) || Request.QueryString["vid"].... // where vid is your querystiing { strFile= Request.QueryString["vid"].... } } try { this.EnableViewState ......

Posted On Wednesday, January 24, 2007 11:04 AM

Digitally Signing a Word Document + C#

this is a single way to sign a document

*********************************

ThisApplication.ActiveDocument.Signatures.Add();

 

ThisApplication.ActiveDocument.Signatures.Commit();

Posted On Thursday, January 4, 2007 9:36 AM

Adding Watermark on Word file(C#)
public { Word. void AddWatermark()Application wordApp = null;// applicationObject = application; // object oname = applicationObject.GetType()... BindingFlags.GetProperty, null, applicationObject, null); { wordApp = (Word. } { Word. doc.ActiveWindow.ActivePane... Microsoft.Office.Interop.Word. Word. Word. doc.Sections[1].Range.Selec... doc.ActiveWindow.ActivePane... = Word. wmShape = mSelection.HeaderFooter.Sha... wmShape.Select( ActiveWindow.ActivePane.Vie... ......

Posted On Thursday, January 4, 2007 9:34 AM

Converting Document to byte of Stream
public static byte[] getFileContent(string fileUrl) { Stream stream1 = new FileStream(fileUrl, FileMode.Open, FileAccess.ReadWrite); byte[] buffer1 = new byte[stream1.Length]; stream1.Read(buffer1, 0, (int) stream1.Length); stream1.Close(); return buffer1; } ......

Posted On Thursday, January 4, 2007 9:10 AM

Copyright © Gaurav Taneja | Powered by: GeeksWithBlogs.net