[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Do you need to install C# separately on ASP.NET

Posted on 2015-02-06
12
Medium Priority
?
133 Views
Last Modified: 2015-02-14
This must be too basic a question and I have to assume that you have a choice of using C# or VB.NET in ASP.NET pages because there is nothing online about it.  Also I'm wondering if there is a separate pure ASP.NET language that is not VB.NET
0
Comment
Question by:vrosas_03
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
12 Comments
 
LVL 34

Assisted Solution

by:Mike Eghtebas
Mike Eghtebas earned 1000 total points
ID: 40595013
When you install Visual Studio, it comes with all sort of language options like vb.net, c#, F#, c++.

And then on top of that, that you have the choice of developing windows applications or asp.net. applications.

Have you installed Visual Studio? If not, there is Express version you can download and work with it from http://www.visualstudio.com/en-US/products/visual-studio-express-vs.

Mike
0
 

Author Comment

by:vrosas_03
ID: 40595021
Ok so your saying that ASP.NET requires visual studio?  You can't use notepad to create ASP.NET files?
0
 
LVL 34

Assisted Solution

by:Mike Eghtebas
Mike Eghtebas earned 1000 total points
ID: 40595025
No. You can do using notepad. It will be much harder without all those intellisense and other tools.

There was a company I did a project that they installed the backbone .net famework but had to proceed without visual studio. Not very many people choose that option maybe that is why you are not able to find many references to it.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40595073
ASP.NET is a server-side framework for creating web applications. It sits atop the .NET Framework. You certainly could write your pages using Notepad, but it would be difficult, as was already mentioned. And theoretically you could write the "code-behind" pages in any .NET language (e.g. C++.NET), but at this time it's really only C# and VB.NET which have integrated support within Visual Studio. You only need code-behind pages for dynamically generated content. If you're just serving up static content, then you would work with IIS directly rather than needing anything that ASP.NET provides.
0
 

Author Comment

by:vrosas_03
ID: 40595080
I don't want to actually use notepad.   I was just using notepad an example.   I use vim.  Is there a compile involved?   Or can IIS display C# text files?
0
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 1000 total points
ID: 40595083
IIS is a web server (software), so yes, it can display text files. You can host media files, XML files, HTML files, etc.

There's only a compile involved if you make either an ASP.NET web site project (and precompile it), or if you make an ASP.NET web application project. If you just host static files, like HTML, then you don't have anything to compile.
0
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 1000 total points
ID: 40595089
P.S.

Even if you did need to compile, the C# and VB.NET compilers are invoked from the command line. You could easily write a batch file or even an MSBuild file to automate your compilation. But again, you only need this if you're using ASP.NET for dynamic content. I've never really compiled anything by command line directly, but I have seen it demonstrated in the docs. I'm not certain how web site projects compile, but I'm sure it's documented somewhere.
0
 

Author Comment

by:vrosas_03
ID: 40595091
It seems like it can handle plain text files.  I only need to run a few lines of asp.net code:

It works with this code:

			<p><% Response.Write(Now())%></p>

Open in new window

   But I got an error on the following code:
			<%
	string[] myArr = newstring[] { "a","b","c","d","e"};

foreach (string strArr in myArr)
{
     Response.Write(strArr + " ");
}

				%>

Open in new window


The second section of code doesn't work but the first does.  I get this error:
C:\inetpub\wwwroot\iisstart.aspx(40) : error BC30109: 'String' is a class type and cannot be used as an expression.

    string[] myArr = newstring[] { "a","b","c","d","e"};

Open in new window

0
 
LVL 34

Assisted Solution

by:Mike Eghtebas
Mike Eghtebas earned 1000 total points
ID: 40595100
a space missing after new keyword:

string[] myArr = new string[] { "a","b","c","d","e"};
0
 

Author Comment

by:vrosas_03
ID: 40595107
I noticed that and changed it and it still doesn't work.  

 BC30109: 'String' is a class type and cannot be used as an expression.
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 1000 total points
ID: 40596942
That code should work fine. Are you sure those are the offending lines?
0
 

Author Closing Comment

by:vrosas_03
ID: 40610376
I was able to run the text files with c# in them if  they are surrounded by the <%   %>  tag delimiters.  I don't know if it pre-compiles it beforehand  but there is a compiler in the IIS folders  and I can compile c# code using the compiler in those folders.      Apparently it works the same as php with a few minor changes.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question