top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

how to run a C# program without using database?

+2 votes
910 views
how to run a C# program without using database?
posted Dec 23, 2014 by Ganesh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

I think it should be possible without any issue see the following helloworld program -

using System;
namespace HelloWorld
{
    class Hello 
    {
        static void Main() 
        {
            Console.WriteLine("Hello World!");

            // Keep the console window open in debug mode.
            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }
    }
}

Steps to execute -
1. Start Visual Studio.
2. On the menu bar, choose File, New, Project.
The New Project dialog box opens.
3. Expand Installed, expand Templates, expand Visual C#, and then choose Console Application.
In the Name box, specify a name for your project, and then choose the OK button.
4. The new project appears in Solution Explorer.
5. If Program.cs isn't open in the Code Editor, open the shortcut menu for Program.cs in Solution Explorer, and then choose View Code.
6. Replace the contents of Program.cs with the following code.
7. Choose the F5 key to run the project. A Command Prompt window appears that contains the line Hello World!

answer Dec 23, 2014 by Salil Agrawal
How to hide web config(am using sql server 2008) ,how to hide my login page?
I want to access particular page without web config(with out using database)?
Cant understand anything, probably you are talking about a new problem. If so then raise a new query (may with proper info so that a new person can get the complete context of the problem)
Waiting for your response or new query :)
How to open a particular page in C# without connection string and with out  database?
<connectionStrings>/////</connectionStrings>  without connection string and  without database connection ...
how to run each and every c# page in browser?
how to run a c# program without using DB is possible only

if developer needs to run the particular aspx page means just simply design. ex Add.aspx and code in Add.cs page
protected void btnAdd()
{
txtAnswer=convert.Tostring(txtNumber1+txtNumber2);
}

 in this scenario we no need any Database or connectionString we can run the page in web browser.
How to create combo box with filtering and auto completeing using jquery and c#?
Better to ask a fresh question in place of counter comment so that it can reach to audiences?
Similar Questions
0 votes

I want to connect a particular MONGODB database to c# application using Web.config.
Please tell me how to do it?

+1 vote
using System;

namespace CareerRideTest
{    
  class A
  {    
    public A()
    {
      Console.WriteLine("I am in A");
    }
  }

  class B : A
  {
    public B()
    {
      Console.WriteLine("I am in B");
    }
  }

  class C : B
  {
    static C()
    {
      Console.WriteLine("I am in Static C");
    }
    public C()
    {
      Console.WriteLine("I am in C");
    }
  }    

  class MainClass
  {
    static void Main(string[] args)
    {
      C obj = new C();    
      Console.ReadKey();    
    }
  }    
}
...