Posts

Showing posts from July, 2012

Copy Excel Worksheet One File to Another File in c#

Please flow the below steps . Step 1 Add reference Microsoft.Office.Interop.Excel; Step 2 Use below namespace . using Microsoft.Office.Interop.Excel; using System.Reflection; Step 3 Copy & Paste below code inside the button click event or any event you want to copy worksheet destination file to source file .   ApplicationClass excelApplicationClass = new ApplicationClass();             _Workbook finalWorkbook = null;             Workbook workBook = null;             Worksheet workSheet = null;             Worksheet newWorksheet = null;             try             {                 //Open the destination WorkBook                 finalWorkbook = excelApplicationClass.Workbooks.Open(Server.MapPath("Test.xlsx"), false, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);                 //Open the source

Hide Extension in Website with Asp.net

Master in Dot Net: Hide Extension in Website with Asp.net : Steps: 1: First Create a Global.asax file in your website 2: Paste the code below in Global.asax file . <%@ Application Language="C...

Hide Extension in Website with Asp.net

Image
Steps: 1: First Create a Global.asax file in your website 2: Paste the code below in Global.asax file . <%@ Application Language="C#" %> <script runat="server">     void Application_BeginRequest(object sender, EventArgs e)     {         string curruntpath = Request.Path.ToLower();         curruntpath = curruntpath.Trim();         bool isredirected = curruntpath.EndsWith(".aspx");         bool isredirected2 = curruntpath.EndsWith(".html");         bool isredirected3 = curruntpath.EndsWith(".jpg");         bool isredirected4 = curruntpath.EndsWith(".jpeg");         bool isredirected5 = curruntpath.EndsWith(".gif");         bool isredirected6 = curruntpath.EndsWith(".png");         bool isredirected7 = curruntpath.EndsWith("css");         bool isredirected8 = curruntpath.EndsWith(".js");         bool isredirected9 = curruntpath.EndsWith(".png"