Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how to open a .cs file

Posted on 2004-09-13
4
Medium Priority
?
1,980 Views
Last Modified: 2010-05-18
How do I open a .cs file?

The code looks like C# asp.net


Thanks.
0
Comment
Question by:duckers1234567890
[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
  • 3
4 Comments
 
LVL 10

Expert Comment

by:jnhorst
ID: 12051852
That's what it likely is.  You can view it using any text editor as it ASCII text.  If you have Visual Studio you can use that too.  Just note that if you change it, the project has to be recompiled for any changes to be applied.  The .cs files are compiled into a dll file usually in a bin folder of an asp.net application.

John
0
 

Author Comment

by:duckers1234567890
ID: 12051863
how do I run it?  In a web browser? or called upon as an include?

Thanks.
0
 
LVL 10

Accepted Solution

by:
jnhorst earned 220 total points
ID: 12051921
You don't really "run" it.  When you create an aspx page, Visual Studio creates the .cs file as what is called "codebehind".  It is an object-oriented representation of the page.  When you compile the application, the classes defined in the .cs files all get compiled up into what is called a "namespace".  If you look at an aspx page, the very first line (usually) has what is called a Page Directive.  In that element is an attribute like this: Inherits="namespace.pageclass".  SO if I had an application named WebApp1 and a page in this app called start.aspx, this would be Inherits="WebApp1.start".

When a user requests start.aspx, that element tells the asp.net runtime running under IIS to try to instantiate the "start" class in the WebApp1 namespace that is all defined in the dill file for the app, which is created when the app is compiled.  In fact, when a developer creates a site on a development machine, the .cs files should not be copied onto the server, as when the app is actually run, they are not used, not even as includes.

John
0
 
LVL 10

Expert Comment

by:jnhorst
ID: 12051926
Question: are these files like this: "start.aspx.cs" ("start" could be any filename).

John
0

Featured Post

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.

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

609 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