Saturday, March 24, 2012

Web Custom Controls

I am new to programming ASP.NET.
I am working with a book - SAMS Teach Yourself ASP.NET
My Question:
The book is discussing custom controls. It wants me to compile my .vb file with a command line using VBC.exe.
Unfortunely, the command line reads "'vbc' is not recognized as aninternal or external command, operable program or batch file."
What do I do to change this?
Also, is there a way to compile the .vb files with VISUAL STUDIO?
THANK YOU
Make sure you are not using cmd to run the command vbc. You either have to use the Visual Studio .NET command prompt or make sure that you are in the correct directory where Visual Studio was installed.
To ensure that the commnand prompt will work you need to add a reference, in the PATH environment variable, to the directory where the executable is (usually C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 - if you're using v1.1, otherwise change the last directory to the version you are using). To add this to the PATH environment variable:
Start Menu > Settings > Control Panel > System
in System Properties window:
Advanced Tab > Environment Variables (button)
in Environment Variables window, in the System variables section, find and select Path. Click Edit and add a semi-colon (;) and then the directory path above.
To use VS.NET to compile the file you would need to create a project and add the .vb file to the project. You can then use the Build menu (or Ctrl + Shift + B) to compile the file. Note: Make sure you have all of the relevant Namespaces listed in the References section.

0 comments:

Post a Comment