This blog is about the dotnet.all types of codes,news about dotnet including asp.net,vb.net,c# and know about new dotnet technology.programing in asp.net,vb.net,c#, ajax, AJAX tech support for .net and discuss the new technology in dotnet.ncluding asp.net,vb.net,c# and know about new dotnet technology.programing in asp.net,vb.net,c#, ajax, AJAX tech support for .net and discuss the new technology in dotnet.asp.net programming,dot net programming,dotnet programs,dotnet source code,source code.

Free Hosting

Free Hosting

Friday, February 15, 2008

Build Your Website Fast With These Tools

Without the right tools, building a website can be very time consuming. Here you can find the software and resources that I use to make my life easier whenever I need to set up a new web site.
#1. Html Editor
The first thing you need to build a website is an html editor. In particular, you need a visual editor, that makes creating a web page as easy as creating a regular Word document.
If you have Microsoft Office on your computer, you should check whether it came with FrontPage. This is probably the best option if you have never dealt with html before. Out of all the html editors available, FrontPage is the one that most closely resembles Word.
If you don't have Frontpage and have some money to spend, I would recommend going with Macromedia Dreamweaver. This is a much more powerful visual html editor, which is slightly more difficult to use, though.
There is also a free alternative to these software. It is called Nvu and is similar to FrontPage in functionalities, but a little harder to get used to. If you have a tight budget and you are willing to invest a little more time in learning, Nvu is the way to go.
#2. Templates
Buying a ready-made website template means cutting your development time considerably. You can find professionally designed website templates that costs less than $100. If you consider how much time it would take you to create something similar, you will agree with me that it is a bargain price.
My favourite place for finding website templates is TemplateMonster.com.
#3. Graphics
If used properly, images can make a website more persuasive and convince your visitor to take the action you desire (filling up a contact form, completing a purchase, etc.). Believe me, it's not easy to find professionally looking photos and graphics at affordable prices. Whenever I need to shop for images, I know that on iStockPhoto I will find what I need.
You can buy an image for as little as one dollar and use it on as many websites as you want. Always choose "web format" when completing your purchase, the other formats are more expensive and you need them only if you plan to use that image on printed material too (you need a greater resolution for that).
#4. Image Editing Software
When you buy images on iStockPhoto, you still need to resize them to fit in your website design. You need an image editing software to do so and these are the ones I recommend.
The most widely known free image editing software is called The Gimp. It is a really complete solution, but can be intimidating for a beginner. Paint.NET is what I recommend if you have never modified an image before: it offers less features, but it's much easier to get used to.
Photoshop Elements has the best balance between ease of use and features. Adobe offers you access to Photoshop "little brother" for less than $100. I have been using this software since version 2.0 and it is getting better with every new release.
#5. Tons Of Free Scripts
Would you like to set up a contact form for your website but you don't know anything about programming? Do you want to show the current date in your web pages? Then you need to visit HotScripts.com.
This website is a collection of free and paid scripts that you can implement on your website in minutes. You can filter the results by programming language (php, asp, asp.net, javascript) and next to each script you can see whether it has a free or commercial license.
#6. Ftp Software
Now that your website is done, you need to upload it to your ftp account, so that it can be seen online. The software I recommend in this case is FileZilla. It is free and it takes you less than a minute to configure your ftp account and start uploading your files.
These are the resources that helped me save hours of work every time I needed to create a new website. I am sure they will prove their effectiveness to you too!







ASP.NET Web Hosting

ASP means Active Server Pages and it is a server-side technology built by Microsoft to allow website owners to build dynamic web pages. An ASP.NET web site hosting service is a server that supports applications build in ASP.
What Can ASP.NET web hosting Do For You?
An ASP.NET web hosting service allows you to create dynamic web pages. If you are the owner of an online business, you can use ASP.NET to create order forms for your customers to fill in. Another way to use ASP.NET is to create a contact form or make a survey on your site. It also offers you the possibility you to display time, date and other types of information in various ways.
How To Choose an ASP.NET web hosting Service?
The first thing you have to do is take a look at the files you need to host and determine how much storage space you need. The average price for 1GB storage space is less than $10 a month and you have to make sure you don't overpay. Try not to spare your disk space, no matter how much you have. Keep all your ASP.NET and HTML files optimized and compress your images. The smaller they are, the faster will your web pages load.
Another important thing in choosing an ASP.NET web hosting service is bandwidth. If you have included only a few pictures on your website and your files are small, you don't need too much bandwidth. However, if you have larger files, such as big images, MPEG or MP3 files, bandwidth is very important for your pages to load fast.

While some ASP.NET web hosting services provide only basic database options, such as MySQL or Access, others offer MSSQL as well. If you own a small business, Access or MySQL should be enough. However, if you can predict you will have to handle high traffic, an ASP.NET web hosting service is better.

Connectivity is yet another important issue when choosing an ASP.NET web hosting service. Ask your potential provider about the Internet connection they have and the number of ISPs they are connected to for preventing downtime. Ask what their uptime guarantee is and look over customer reviews to see if their clients are satisfied.

Don't be tempted to stop at a very cheap ASP.NET web hosting package. Check if you are dealing with a reliable provider, preferably one that has been in business for several years. Find out about the type of technical support they are offering. You should be able to learn about this from their website. Find out if they have a 24/7 service and a hotline as well.

Top ASP.NET web hosting Providers
Discount ASP.NET
This is a world leader in ASP.NET web hosting, with three awards from prestigious hosting publications in only one year. You can choose from several ASP.NET packages with advanced features all at affordable prices.
Maximum ASP
Maximum ASP is another reliable ASP.NET web hosting provider, offering a wide range of hosting packages and the most advanced Microsoft technologies.
Seek Dot Net
Seek Dot Net is another worldwide recognized hosting provider, with offices in United States and Australia. They offer a wide range of hosting solutions, such as shared, dedicated and enterprise packages, and provide a high level of technical support. With just a little information on what you need to look for in an ASP.NET host, you will sure find the right provider that will help you develop a strong online business.

Thursday, February 14, 2008

Saving sent email Information to XML c#

This is a sample c# AddIn, hooking the SentFolder Items Add Event, and saves Information from outgoing Emails to an XML file. (Saving sent email Information to XML c# )
CODE:
namespace TestAddIn
{
using System;
using Off = Microsoft.Office.Core;
using Ol = Microsoft.Office.Interop.Outlook ;
using Extensibility; using System.Runtime.InteropServices;
using System.Data;
using System.Xml;
using System.IO;
using System.Reflection;
using System.Diagnostics ;
#region Read me for Add-in installation and setup information.

// When run, the Add-in wizard prepared the registry for the Add-in.
// At a later time, if the Add-in becomes unavailable for reasons such as:
// 1) You moved this project to a computer other than which is was originally created on.
// 2) You chose 'Yes' when presented with a message asking if you wish to remove the Add-in.
// 3) Registry corruption.
// you will need to re-register the Add-in by building the MyAddin21Setup project
// by right clicking the project in the Solution Explorer, then choosing install. #endregion
///


/// The object for implementing an Add-in.
///

///
[GuidAttribute("CFC4FD8C-6769-46C2-8B32-F3ACA3A14CF1"),
ProgId("TestAddIn.Connect")]
public class Connect : Object,
Extensibility.IDTExtensibility2
{
// The Instance Object private object myInstance;

// The Application Object private Ol.Application myApplication;
// The Sent Folder private Ol.MAPIFolder mySentFolder;

// My DataSet private DataSet myDataSet;
// My DataTable private DataTable myDataTable;
///
/// Implements the constructor for the Add-in object.
/// Place your initialization code within this method.
///
public Connect()

{
}
///
/// Implements the OnConnection method of the IDTExtensibility2 interface.
/// Receives notification that the Add-in is being loaded.
///

///
/// Root object of the host application.
///
///
/// Describes how the Add-in is being loaded.
///
///
/// Object representing this Add-in.
///
///
public void OnConnection(object application,
Extensibility.ext_ConnectMode connectMode,
object addInInst, ref System.Array custom)
{
try
{ myApplication = (Ol.Application) application;
myInstance = addInInst;
LoadXMLData();

mySentFolder = myApplication.Session.GetDefaultFolder (Ol.OlDefaultFolders.olFolderSentMail );
mySentFolder.Items.ItemAdd +=new Microsoft.Office.Interop.Outlook.ItemsEvents_ItemAddEventHandler(Items_ItemAdd);
}
catch (System.Exception ex)
{
Debug.WriteLine(ex);
}
}
///
/// Implements the OnDisconnection method of the IDTExtensibility2 interface.
/// Receives notification that the Add-in is being unloaded.
///

///
/// Describes how the Add-in is being unloaded.
///
///
/// Array of parameters that are host application specific.
///
///
public void OnDisconnection(Extensibility.ext_DisconnectMode disconnectMode, ref System.Array custom)
{
myInstance = null;
if (mySentFolder != null)
{
// DeRegister Event mySentFolder.Items.ItemAdd -=new Microsoft.Office.Interop.Outlook.ItemsEvents_ItemAddEventHandler(Items_ItemAdd);
Marshal.ReleaseComObject(myApplication);
}
if (myApplication != null)
{
Marshal.ReleaseComObject(myApplication);
}
GC.Collect ();
}
///
/// Implements the OnAddInsUpdate method of the IDTExtensibility2 interface.
/// Receives notification that the collection of Add-ins has changed.
///

///
/// Array of parameters that are host application specific.
///
///
public void OnAddInsUpdate(ref System.Array custom)
{
}
///
/// Implements the OnStartupComplete method of the IDTExtensibility2 interface.
/// Receives notification that the host application has completed loading.
///

///
/// Array of parameters that are host application specific.
///
///
public void OnStartupComplete(ref System.Array custom)
{
}
///
/// Implements the OnBeginShutdown method of the IDTExtensibility2 interface.
/// Receives notification that the host application is being unloaded.
///
///

/// Array of parameters that are host application specific.
///
///
public void OnBeginShutdown(ref System.Array custom)
{
}
///
/// Loads the Data from XML File
///

private void LoadXMLData()
{
// Create a new DataSet myDataSet = new DataSet ("SentData");
// Check, if File exists if (File.Exists (@"C:\mydata.xml"))
{
// Yes, read the XML-Data into Dataset myDataSet.ReadXml (@"C:\mydata.xml");
// Get the DataTable
if (myDataSet.Tables.Count > 0)

{
myDataTable = myDataSet.Tables [0];
}
}
if (myDataTable == null)

{
// Create a new DataTable myDataTable = new DataTable("DataTable");

// Add Columns to DataTable (would be nicer with a SchemaFile) myDataTable.Columns.Add ("EntryID",Type.GetType ("System.String")); myDataTable.Columns.Add ("Subject",Type.GetType("System.String")); myDataTable.Columns.Add ("SentOn",Type.GetType("System.DateTime"));
myDataSet.Tables.Add (myDataTable);
SaveXMLData();
}
}
///
/// Saves the Data to XML
///

private void SaveXMLData()
{
// Accept Changes myDataSet.AcceptChanges ();
// Save the XML Data myDataSet.WriteXml (@"C:\mydata.xml");
}
///
/// EventHandler for Items Add Event of Sent Folder
///

/// The Outlook Item
private void Items_ItemAdd(object Item)
{
Ol.MailItem myMail = null; try
{
// Check Item, could be a MeetingRequest also if (Item is Ol.MailItem)
{
// Cast Object to MailItem myMail = (Ol.MailItem) Item;
// Create a new DataRow DataRow newRow = myDataTable.NewRow ();
// Fill Data into Row newRow["EntryID"] = myMail.EntryID; newRow["Subject"] = myMail.Subject ; newRow["SentOn"] = myMail.SentOn ;
// Add Row to DataTable myDataTable.Rows.Add (newRow);

myDataTable.AcceptChanges ();
// Save new Data SaveXMLData();
}
}
catch (System.Exception ex)
{
Debug.WriteLine(ex.Message );
}
finally
{ // Release the Reference to MailObject if (myMail != null) { Marshal.ReleaseComObject (myMail);
}
}
}
}
}

Friday, February 8, 2008

.NET Languages

The common language runtime defines a common runtime for all .NET languages. Although C# and VB.NET are the two flagship languages of .NET, any language that targets the common language runtime is on equal footing with any other language. In this section we'll talk about the features that the .NET languages offer.

Classes and Objects:
The common language runtime deals in managed types. The runtime can load types, execute methods of a type, and instantiate objects of a type. Although the common language runtime supports several forms of types, such as classes, interfaces, structures, enumerations, and delegates, all of these forms ultimately are represented as classes at the lowest levels of the runtime. And although the common language runtime does support exporting entry points that are not enclosed in a type, at least two languages (VB.NET and C#) do not support entry points outside of a type definition.

Although in OOP it is possible to invoke some class methods without objects, the most common use of classes is to produce objects. In the common language runtime, an object is an instance of exactly one class. The operations that may be performed on an object are determined by the object's class. The amount and type of storage used by the object is determined by the object's class. In essence, the class acts as a factory or template for objects that belong to that class.

The common language runtime supports instantiating objects based on a class. Each programming language exposes this functionality somewhat differently. In C# and VB.NET, for example, the new keyword is used to create a new object of a given class, as shown in the following two code snippets:

C#
IceCream ic = new IceCream();
ic.MakeACone();

VB

Dim ic as new IceCream();
ic.MakeACone ()

Classes are defined in C# and in VB.NET using the class keyword. The following code shows sample classes in each:

C# Class

public class IceCream
{
string strFlavor = "Chocolate";
public void MakeACone()
{
System.Console.Write( "I have made a cone. My flavor is "
);
System.Console.WriteLine( strFlavor + "." );
}
}

VB.NET Class

Public Class IceCream
Dim strFlavor as string = "Chocolate"
Public Sub MakeACone()
System.Console.Write("I have made a cone. My flavor is ")
System.Console.WriteLine(strFlavor & ".")
End Sub
End Class

Constructors

Unless the programmer takes special steps, the fields of the class will be set to a well-known initial value when an object is created. Numeric types are set to zero, and objects are set to null (C#) or Nothing (VB). You can change the values that are used by writing a constructor. A constructor is a special method that is called automatically to set the class's fields to a programmer-determined state prior to the first use of the object (or class).

Constructors are called when a new object is created, before the new operator returns the reference to the new object. Constructors may accept parameters, and they may be overloaded based on parameter count or type. The following code shows typical constructors:

C#

public class IceCream
{
private int i = 5;
public IceCream()
{
System.Console.WriteLine( "This is delicious!" );
}
}


VB.NET

Public Class IceCream
Sub New()
System.Console.WriteLine( "This is delicious!" )
End Sub
End Class

Namespaces
Namespaces
in the .NET runtime are used to organize classes and types into separate spaces. You define namespaces using the namespace keyword, as shown in the following code:

namespace Rick
{
public class MyClass
{
public static void DoSomething()
{
}
}
}

The using keyword in C# promotes elements in other namespaces into the global namespace. The following code shows an example of referencing two separate namespaces with the using keyword:

using Rick;
using System;


MyClass.DoSomething();
Console.WriteLine( "Just called DoSomething()" );



Installing SQL Server 2005 Express Edition

After making sure IIS, the .NET Framework, and the SDK are installed correctly,
it’s time to move forward and install the next piece of software that you’ll be
using as we work through this book: SQL Server 2005 Express Edition.

SQL Server 2005 is Microsoft’s database solution for medium to large companies
and enterprises. SQL Server 2005 can be quite expensive, it generally requires
its own dedicated database server machine, and, at times, it necessitates that a
certified database administrator (DBA) be employed to ensure its maintenance;
yet it does offer a robust and scalable solution for larger web applications.

For the examples in this book, we’ll use SQL Server 2005 Express Edition, which
is free and sufficiently powerful for our needs. Unlike the expensive versions,
SQL Server 2005 Express Edition doesn’t ship with visual management utilities,
but you can use another free tool from Microsoft—SQL Server Management
Studio Express, which we’ll install next)—for these purposes.

You can install SQL Server 2005 Express Edition as follows:

1. Navigate to http://msdn.microsoft.com/vstudio/express/sql/, and click the
Download Now link.

2. In the next page, you can choose between SQL Server 2005 Express Edition,
and SQL Server 2005 Express Edition with Advanced Services. The former
will be fine for our purposes. Your system should meet the necessary requirements,
so go ahead and click Download.

3. Once the download has completed, double-click the downloaded executable
file, and follow the steps to install the product. It’s safe to use the default
options all the way through, though it is a rather long process.

Provided that everything goes well, SQL Server 2005 Express Edition will be up
and running at the end of the process. Like IIS, SQL Server runs as a service in
the background, accepting connections to databases instead of web pages. The
SQL Server is accessible at the address (local)\SqlExpress.

Installing the .NET Framework

Installing the .NET Framework:
The best method of acquiring the .NET Framework is to download and install it directly from the Web. Note that it is also delivered through Windows Update, so you may already have it installed on your system. To check, open the folder C:\WINDOWS\Microsoft.NET\Framework (if your copy of Windows is installed somewhere other than C:\WINDOWS, change this path accordingly). If this folder doesn’t exist, you definitely don’t have the .NET Framework installed. If it does exist, you should find inside it at least one folder with a name like v1.1.4322. Each of these kinds of folders holds a different version of the .NET Framework you have installed. If at least one of these folders’ names doesn’t start with v2 or higher, you’ll need to install the latest version of the .NET Framework.

To install the latest version of the .NET Framework, simply follow the steps
outlined below:


1. Go to the ASP.NET support site5 and click the Download the .NET Framework
link.


2. Under the .NET Framework Version 2.0 Redistributable Package heading, click the appropriate download link for your hardware. Remember, we’ll install the redistributable package first, then the SDK. The link will advance you to a download page.

3. Choose the language and version of the installation you want, and click Download.

4. Save the file to a local directory. After the download is complete, doubleclick the executable to begin the installation.

5. Follow the steps presented by the wizard until installation completes.

Thursday, February 7, 2008

What Is ASP.NET?

The original definition of ASP.NET, right at the start of the chapter, portrayed ASP.NET as a powerful and flexible technology for creating dynamic Web pages, and this still holds true. However, as you now know, it isn't the only way to deliver dynamic Web pages, so let's refine our definition a little so it reads as follows:

ASP.NET is a powerful and flexible server-side technology for creating dynamic Web pages.


Secondly, ASP.NET is only one of a set of technologies that comprise the .NET Framework. For now, you can think of this as a giant toolkit for creating all sorts of applications, and in particular, for creating applications on the Web. When you install ASP.NET, you will also install the .NET Framework at the same time. You will use bits and pieces of the .NET Framework throughout this book. In fact, you can also use the old versions of ASP with the .NET Framework, so why are we not using that instead?

How Does ASP.NET Differ from ASP?

ASP is restricted to using scripting languages, mainly JavaScript or VBScript (although it can be any scripting language supported by the Windows system). Scripting languages are like cut-down or junior versions of full programming languages in that they aren't as powerful and don't support all the features of full programming languages. In addition, when you add ASP code to your pages, you do it in the same way as you would do client-side script, and this leads to problems such as messy coding and restricted functionality.

ASP.NET has no such problems. It allows you to use a far greater selection of full programming
languages and fully utilize the rich potential of the .NET Framework. It helps you create faster, more reliable, dynamic Web pages with any of the programming languages supported by the .NET Framework. Typical languages supported natively are C#, VB .NET and JScript.NET (a new version of Jscript). On top of this, it is expected that third party developers will create versions of Perl, Python, and many others to work in ASP.NET.


Secondly, ASP.NET comes with a far greater set of controls that you can place on a page without any extra ASP.NET coding. With classic ASP, programmers tended to rely on six objects, such as Request and Response to do everything and a couple of extra components that came with ASP. With ASP.NET, things are more jargon free. If you want to put a button on your page, you put an ASP.NET Button control on your page, and if you want a text box, you place an ASP.NET TextBox control. ASP.NET comes with a rich set of controls that can be applied to many common development scenarios.

A third and final reason is the separation of your ASP.NET code from your HTML. It's a commonly cited reason, if not always a well-explained one. Designers and developers play two very different roles in Web development. For instance, a developer could program a lottery number generator, but probably couldn't design a logo for a company. It makes sense to keep these two disciplines separate.

However, in ASP they aren't separate. The ASP code is sprinkled liberally between the HTML lines, like nuts over an ice cream sundae. That might be fine, unless you happen to be allergic to nuts. Now stretching this allegory a bit, it's quite common for designers to need to tinker with the actual HTML code on a Web site, but how can they alter it with confidence, if it's totally interspersed with the ASP code? In ASP.NET, you can keep the ASP code and HTML in separate files, making both the developer and the designer's life much simpler.


Using C# with ASP.NET

ASP.NET has been described as a technology and not a language, and this is an important distinction! ASP.NET pages can be made from one of many languages. However, you are not expected to know many different languages, nor are we going to teach them to you. This book uses just one language, C#, to demonstrate ASP.NET. We've chosen C# as it's arguably the most concise, and it can do just about anything that the other .NET languages can. Lastly and most importantly, C# comes free with ASP.NET – so when you install ASP.NET you get C# as well!

At this stage you may be thinking, "Hang on, I've got to figure out C#, then I've got to get a handle on ASP.NET – that sounds like an awful lot to learn." Don't worry; you won't be learning two languages. ASP.NET, as we said right from the beginning, is not a language – it is a technology. This technology is accessible via a programming language. What we're going to be doing is teaching you ASP.NET features as we teach you C#. In other words, you will be creating your Web pages using C# and using ASP.NET to drive it. However, before you rush out and get a C# book instead, remember that this book will approach the language from the angle of creating dynamic Web pages only.

ASP.NET is a server-side technology that lets you use fully fledged programming
languages to create your Web pages.


dotnet(.Net) Project Source code Downloads and Tutorials

Email Subscrption



Enter your email address:

Delivered by FeedBurner

Feedburner Count

Unique Visitor

Design by araba-cı | MoneyGenerator Blogger Template by GosuBlogger