25 August 2007

I think that here is the fastest way to bind a data grid for web application.

  • Login with SQL Server 2005 with Windows Authentication.


  • Open your database,
  • Right Click your table and click on Modify menu for which one do you want to bind.
  • Select Fields which are do you want to show in browser. user Control key to select.

  • Press Control + C to copy those column.
  • Now Open a web page in devenv.
  • And Click to for Control + V data binding.
  • See bellow
All Selected Columns and Connection string will be automatically

  • Press F5 to run
Result in browser.
Done. Isn't it fastest?

If you did not login with "Windows Authentication" so you have to write down password to connect that sql server in Web.config file.

24 August 2007

See this example here.

I have created an interface.
public interface myInterFace1
{
void Operation(string myParam);
string myName();
}
it have two methods. Operation and myName.

Now create a class.
class Program
{

}
Now, lets inherit with interface.
    class Program:myInterFace1
{

}
Now I'm using myInterFace1 in Program class, So I need to write down all methods of that interface in my class.

it's do that with rick.

Right click on inter face name near (:) sign.
It will pop up a menu, where you found "Implement Interface" menu.

Click on that menu.

class Program:myInterFace1
{
static void Main(string[] args)
{
}

#region myInterFace1 Members

public void Operation(string myParam)
{
throw new Exception("The method or operation is not implemented.");
}

public string myName()
{
throw new Exception("The method or operation is not implemented.");
}

#endregion
}
All method of that interface will be write down there in that class automatically.

It's a very small but useful example during the development of code.

15 August 2007

Here you will found programing code difference between VB.NET and C#.

Following code structures are available there with examples.
  • Program Structure
  • Comments lines
  • Data types
  • Constants
  • Enumerations
  • Operators
  • Choices (If)
  • Types of Loop
  • Array
  • Function
  • Working with String
  • Exception Handling
  • Namespaces
  • Classes and Interfaces
  • Constructors and Destructors
  • Using Objects
  • Structs
  • Properties
  • Delegates and Events
  • Console I/O
  • File I/O.