Method 1: Online Method (When you are Online, connected to Internet.)
Go to the Control Panel. Select Uninstall a Program, Select Turn windows features on or off from left side. In the following window click on the .NET Framework 3.5 (included .NET 2.0 and 3.0) select it & click OK.
Now, it will download the entire package from the internet & install the .NET Framework feature.
Method 2: When you are Offline and not connected to Internet
When you are in desktop, hit Windows button+W, and type cmd. Right click on Command Prompt and select Run as Administrator. Insert the Windows 8 installation DVD in your DVD rom. Later, write the following commands in the command prompt.
dism.exe /online /enable-feature /featurename:NetFX3 /Source:Z:\sources\sxs
Here Z is the drive letter of DVD rom.
If you did everything correctly, you’ll see some text like following:
When 100% finished, you can exit the command prompt.
And yes, .net 3.5.1 is now in your Windows 8 PC