ASP.NET

Adding a Controller

MVC stands for model-view-controller.  MVC is a pattern for developing applications that are well architected, testable  and easy to maintain. MVC-based applications contain: Models: Classes that represent the data of the application  and that use validation logic to enforce business rules for that data. Views: Template files that your application uses to dynamically  generate HTML […]

Introduction to MVC

Getting Started Start by installing and running Visual Studio Express 2013 for Web or Visual Studio 2013. Visual Studio is an IDE, or integrated development environment. Just like you use Microsoft Word to write documents, you’ll use an IDE to create applications. In Visual Studio there’s a toolbar along the top showing various options available to […]

how to open word file on browser in asp.net

protected void Button1_Click(object sender, ImageClickEventArgs e) { string FullFilePath =//path of file //”D:\\ASP\\ASP.doc”; FileInfo file = new FileInfo(FullFilePath); if (file.Exists) { Response.ContentType = “application/vnd.ms-word”; Response.AddHeader(“Content-Disposition”, “inline; filename=\”” + file.Name + “\””); Response.AddHeader(“Content-Length”, file.Length.ToString()); Response.TransmitFile(file.FullName); } }

Convert PPT or PPTX into Image

PPT or PPTX convert into Image Microsoft.Office.Core => Microsoft Office 12.0 Object Library Microsoft.Office.Interop.PowerPoint => Microsoft.Office.Interop.PowerPoint using OFFICECORE = Microsoft.Office.Core; using POWERPOINT = Microsoft.Office.Interop.PowerPoint; POWERPOINT.Application App = new Microsoft.Office.Interop.PowerPoint.Application(); POWERPOINT.Presentation pres = App.Presentations.Open(FilePath, OFFICECORE.MsoTriState.msoTrue, OFFICECORE.MsoTriState.msoFalse, OFFICECORE.MsoTriState.msoFalse); pres.SaveAs(NewFolderPath, POWERPOINT.PpSaveAsFileType.ppSaveAsJPG, OFFICECORE.MsoTriState.msoFalse); pres.Close();