Tag Archives: .net

Replace words on MS Word using C#

Hi,

Recently I was instructed to create an application that will be able to replace an array of words and replace them with an array of corresponding words on an MS Word document. With this I’ve searched the following:

Prerequisites

  1. Visual Stduio
  2. Install the nuget package DocX
  3. Administrative access on the context the application is running

Code

Dictionary<string, string> lReplacements = new Dictionary<string, string>();
string newFullPath = @”c:\sample.docx”;

using (DocX document = DocX.Load(newFullPath))
{

//for loop is better than foreach
foreach (var item in lReplacements)
{

document.ReplaceText(item.Key, item.Value);

}
document.Save();

}

Hope it helped you as it helped me with this simple snippet.

God Bless!
Thanks,
Thomie

Tips : Install .Net 3.5 of Windows Feature when under Proxy

Hi There,

We recently had a problem with our Windows 10 to Install .Net 3.5 of Windows Feature when under Proxy. We found out that the installer of Windows has the said installer with it but needs to be triggered by the following steps:

1. Run CMD as Administrator
2. DISM /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:D:\sources\sxs

Where as, D:\sources\sxs is the extracted copy of the the sources\sxs

If you are going to follow this steps make sure that the source of the installer is the same installer used to install the current OS (Windows 10 = Windows 10, Windows Server 2022 = Windows Server 2022).

God Bless!

Thanks,
Thomie

Opencast, Your Free and Open Video Casting!

Hi There,

We are glad to invite you to our first Free service product, OpenCast. OpenCast is an online broadcasting websites that aim to help people broadcast freely and openly. The website is created using ASP.Net MVC, Entity Framework, SignalR, & OpenTok.

 

Feel Free to register now at http://opencast.info

God Bless!

Thanks,
Thomie

jQuery Extension for ASP .Net MVC

My boss told us to search for a jQuery Extension for ASP .Net MVC to make the development easier. After minutes of searching the web I have found two extensions that you and I can use:

  1. DJME 2 which is an free and Open source
  2. Telerik Extensions for ASP .NET in this case is a paid extension

Both extensions utilizes the creation of custom helper to make jQuery development quite easier but abstracted. Abstracted because you are learning how the extensions should be use to produce jQuery but your not really coding jQuery. 

So in the end, I will still recommend using jQuery it self, doing all the hard works of creating the JavaScript file and code all the way, so you can produce the right jQuery output you have ever wanted.

GAME : MouseAttack v1.0

Download: TJSAsMouseAttack

During my OJT I have experimented on the .Net Framework to develop some games during our free time.

One the games I have develop is the MouseAttack. Its a game were you need to avoid some falling objects in order to get more points. The game was developed for a little time, but I hope you like it.