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.

28 July 2007

Hi, Live Search, Google, Yahoo can also works like a calculator!!!


Lets try here...


Live Search result




Yahoo Search result





Some test for Google Search result







Defy All Challenges is Microsoft site, to get graphical representation using flash technology.


Get information about Office 2007, Vista, Web development and Visual Studio Team System.

Also have some fun there, creating your own cartoon animation.


click here for HTML version.

27 July 2007

Still, Just to days a go I have complete to download Visual Studio 2008 Beta 1, and do day I found that Visual Studio 2008 Beta 2 is released,

So, once again, I have started to download this new version.

26 July 2007

Finally after two weeks hard download, I have "Orcas".

Download Visual Studio Code Name “Orcas” Beta 1

Here are some screen shots:

Select .Net Framework version direct form New project dialogbox.


Create C# and Visual Basic WPF Application


Office 2007 Workbook, document direct in Visual Studio as wall as Template and Add-In.


Office 2003 Workbook, document direct in Visual Studio as wall as Template and Add-In.


Worlflow Application

There are many feature in this version which was available in Team edition of Visual Studio 2005, now they are including in this version of "Orcas".

So, I have started to learn Visual Studio 2008, What about U?

25 July 2007

We can start to give attachment with out blog.

box.net is a site where we can store our documents in a box and can be access them from anywhere.


easy to upload Images, Word document, PDF Files etc.

here is there result in a blog. There is also change view icon in top right corner.

This box is use uses Flash Player for the result.

18 July 2007

Meebo is a great online chat application where AIM, Yahoo, Google and MSN Chat is possible in one browser only.

Please Give me the solution,

Today I had a requirement that I have to get missing number form table and start new ID form that missing value...

Ex. I have a customer table.

ID Name
1 Vijay
2 Rajesh
3 Nitin
5 Manish
6 Bipin
8 Jalpesh

Here, 4 and 7 number are missing, some one have deleted that record. and now suppose user click on add new button he want to generate that missing number.

Here a I have create a small cursor to get that value:


DECLARE @lastID int,
@crrID int

SET @crrID=1;

DECLARE curJob CURSOR FORWARD_ONLY READ_ONLY LOCAL
FOR
SELECT ID FROM Customer ORDER BY ID

OPEN curJob

FETCH NEXT FROM curJob INTO @lastID

WHILE @@FETCH_STATUS = 0 AND @crrID=@lastID
BEGIN
SET @crrID=@crrID+1
FETCH NEXT FROM curJob INTO @lastID
END

CLOSE curJob
DEALLOCATE curJob

SELECT @crrID;


Done. This SQL satisfied my requirement.

But Its now a good idea where thousands of records in a table, I think that there should be some in built functions of SQL Server 2005, who can get me those missing values without any coding and quickly also.

Do you know any other solution?