Free Code behind Snippets for Developers

You.Idea = Me.Sharing + Me.Helping

Simple CRUD on Visual Studio 2010

Posted by dotnetsnippets on November 7, 2009

Hello Guys,

I have sample here on how to create a simple Create, Read, Update, and Delete on Database. This sample created on Visual Studio 2010 Beta 2 using C# and Asp.Net. I did’nt include a validation on this sample. I only want to show on how to Select, Insert, Update, Delete on Database. For those who beginners I hope it will help.

You can now download my Sample File at this Link.

Posted in Asp.Net, C# 4.0 | Leave a Comment »

Creating XML File on Visual Studio 2010

Posted by dotnetsnippets on November 5, 2009

This code snippet will show you on how to create a simple xml file in Visual Studio 10 Beta 2.

Step 1: Add a namespace to your code behind System.Xml and System.Text

Step 2: In your event/method to create an xml file           

                //Create a path were to save the xml file

                String path = Server.MapPath(@”FolderName\MyFileName.xml”); 

                //Instantiate an XmlWriterSettings

                var xmlWrite = new XmlWriterSettings();

                //And other Declaration

                xmlWrite.Indent = true;

                xmlWrite.OmitXmlDeclaration = true;

                xmlWrite.Encoding = Encoding.ASCII;

                //Then try to write a data in xml file

                Using (var write = XmlWriter.Create(path,xmlWrite))

               {

                write.WriteComment(“This is a basic sample on how to create xml file”);

                write.WriteStartElement(“Head”);

                write.WriteStartElement(“Header”);

                write.WriteStartAttribute(“Header”);

                write.WriteValue(HeaderValue);

                write.WriteEndAttribute();

                write.WriteEndElement(); 

                write.WriteStartElement(“Footer”);

                write.WriteStartAttribute(“Footer”);

                write.WriteValue(FooterValue);

                 write.WriteEndAttribute();

                 write.WriteEndElement();

                 write.Flush();

                 }

That’s it. This sample created on asp.net project.

Posted in Asp.Net, C# 4.0, XML | Leave a Comment »

Shortcut Keys on Visual Studio 2010 (Beta 1)

Posted by dotnetsnippets on October 24, 2009

Hello Guys,

I have some shortcut keys on Visual Studio 2010 Beta1. You can download it: Shortcut Keys on Visual Studio 2010

Posted in Tips and Tricks, Visual Studio 2010 | Leave a Comment »

Shortcut Keys on SQL Server 2008

Posted by dotnetsnippets on October 24, 2009

Hello Guys,

I have some shortcut keys on SQL Server 2008 you can download it. Shortcut Keys on SQL Server 2008

Posted in SQL Server 2008, Tips and Tricks | Leave a Comment »

From VS 2008 and VS 2010 Beta 1 Changes

Posted by dotnetsnippets on October 24, 2009

Hello Guys.

Last months when I exploring the Visual Studio 2010 Beta 1, I notice that a lot of changes. I have top 10 lists of changes from VS 2008 to VS 2010 Beta 1, but these lists are from my first exploring on VS 2010 Beta1. The lists are basic but I know you will love it.

  1. Advance Dragging and Docking Window.
  2. Markup snippets on HTML Source.
  3. New Symbols on HTML tags.
  4. Showing Intellesense contain the word that youve looking.
  5. New look start page.
  6. A close button in tabbed document.
  7. Great highlight color.
  8. Maximinzing the tabbed document.
  9. Intellesense on adding namespace.
  10. And some good changes.

Download my attached file: Some Difference code behind and html tags from VS 2008 to VS 2010

Posted in Visual Studio 2010 | Leave a Comment »

Download Visual Studio 2010 Beta 2

Posted by dotnetsnippets on October 21, 2009

Hello guys.

Last month’s I downloaded the Visual Studio 2010 Beta 1. While exploring the VS 2010 Beta 1 I decided to make some blogs about it. But now the Beta 2 will release and ready to download on Wednesday October 21, 2009.

Maybe I should download it and uninstall my Beta 1 and install the Beta 2. But this is also a Beta Version. The final release of Visual Studio 2010 and .NET Framework 4 are scheduled on March 22, 2010. And also there’s another options of developers will choose, because theirs four packages of VS 2010. The Ultimate, Premium, Professional, and Professional without MSDN subscription.

Download Now: http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx

Beta 2 Walkthroughs: http://msdn.microsoft.com/en-us/vstudio/dd441784.aspx

Downloading and Installing: http://channel9.msdn.com/shows/10-4/10-4-Episode-33-Downloading-and-Installing-Visual-Studio-2010-Beta-2/

Visual 2010 Samples: http://msdn.microsoft.com/en-us/dd238515.aspx

Some Details About Packages: http://blogs.msdn.com/jasonz/archive/2009/10/19/announcing-vs2010-net-framework-beta-2.aspx

Posted in Visual Studio 2010 | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.