3 Parts ASP.NET WebParts tutorial

by mosessaur| 17 February 2008| 5 Comments

2 years ago, I wrote 3 parts ASP.NET WebParts tutorial. Bellow are summary of each parts and links to original tutorial on www.C-ShareCorner.com

  1. Creating a Simple WebPart Page and use WebServer controls as WebParts
    Introduction:
    Portal web sites such as MY MSN and MSN Spaces, often organize their data into discrete units that support a degree of personalization. Information is organized into standalone parts [WebParts], and users can rearrange those parts to suit their individual working styles. Such personalization also lets users hide parts that contain information in which they have no interest. What's more, users can save their settings so that the site will remember their preferences the next time they visit the site. In ASP.NET 2.0, you can now build web portals that offer this kind of modularization of information and personalization using the new Web Parts Framework.
    Scope of this Tutorial:
    Here we will see how to add web parts to a web part page. Developing advanced WebParts from scratch is out of this tutorial scope. This tutorial also may has subsequent tutorial that explains more about Web Parts Framework.
    Assumptions:
    This tutorial assumes you are familiar with Data Access Controls and Data Binding Controls such as SqlDataSource and GridView. Also it requires SQL Sever 2005 Express Edition and Visual Web Developer. If you don't have SQL Server Express 2005, install ASPNETDB in your SQL Server instance using aspnet_regsql tool. and configure your application to use this instance as your personalization provider.

    How to create WebParts Page:
    To create a WebParts Page, you need to work with a specific ASP.Net 2.0 Controls:
    • WebPartManager Control, which manages all Web Parts controls on a WebParts Page and must be the first control that you add to the page.
    • WebPartZone Control, which contains and provides overall layout for the Web Part controls that compose the main UI of a page. This control serves as an anchor for Web Part controls. Multiple controls of this control forms the WebParts Page. Read more....
  2. Working with WebParts Page, WebPart Zones & WebParts
    Introduction:
    This tutorial considered to be the second part of the first tutorial Creating a Simple WebPart Page and use WebServer controls as WebParts. Here we will see how can we remove and add WebParts during run time, adding personalizable properties to your WebParts and modifying there values also in run time.

    WebPart Zones:
    There are 4 types of WebPart Zones. Zones is used to host (anchor or dock) WebParts. In the previous tutorial we had a look at WebPartZone. At this tutorial we will have a look at the other another two WebPart Zones, CatalogZone & EditorZone. Read more...

  3. WebParts Communication: How WebParts on a page communicate with each other
    Introduction:
    In this tutorial we will describe how to make WebParts on a WebParts Page communicate with each other. So will see how to use ConnectionsZone and how to enable WebParts to talk to each other by connecting them.
    Assumptions:
    This tutorial assumes that you know how to work with web forms, creating user controls and connecting to data sources using SqlDataSource Control. Also you should know how to use WebPartZone control and to know what are WebParts and WebParts Pages. Read more...

These days many applications are being developed using ASP.NET, I suggest you find an provider suitable for your web development projects.

kick it on DotNetKicks.com

How to build Multi-Language Web Sites with ASP.NET 2.0 and Visual Studio.Net 2005

by mosessaur| 17 February 2008| 1 Comments

Last year I wrote an article about how to build multi-languange web sites with ASP.NET 2.0 and Visual Studio.Net 2005. This is a bookmark to the articles (C#,VB.NET) [poste migrated from old blog]

Introduction: In order to reach international markets through the Internet, supporting different cultures through our applications is essential for being successful. The .NET Framework 2.0 as well as 1.x comes with an integrated infrastructure for creating international applications. Basically, the CLR supports a mechanism for packaging and deploying resources with any type of application. The CLR and the base class library of the .NET Framework come with several classes for managing and accessing resources in applications. These classes are located in the System.Resources and System.Globalization namespaces. Here we will explore the necessary details for working with resources in ASP.NET applications and for creating international ASP.NET applications based on embedded resources and the integrated localization support.

Assumptions: This article assumes that you already know how to build web forms and to use controls and validation controls.

Localization and resource files: Localization support in .Net Framework 2.0 in general and in ASP.Net 2.0 specifically become much more easier and brings fun during localization process. Usually resources are created for every culture the application should support. More specifically, each Web Form -Page- in your web site should have a resources for every culture -language- it should support. For example:If you have a web form with name default.aspx and your web site support English, German and Arabic, then you should have 3 resource files for each culture. The CLR defines a behavior for finding culture-specific resources. With that said, every set of resources has to define a base name that is specified through the first part of the name of the resource file. The second part of the name defines the culture. If the culture portion in the name is not specified, the resources defined in the resource file are used as default resources. For example:Your page name is default.aspx., you have 3 resource files as mentioned earlier, each one resource file should be named as:default.aspx.en-US.resx, default.aspx.de-DE.resx and default.aspx.ar-EG.resx. Not here that we are using United States English, German's Gemran, and Egyptian's Arabic. You can use general English or general German or general Arabic like this:default.aspx.en.resx, default.aspx.de.resx and default.aspx.ar.resx. Also you can use another specific culture like using Switzerland German culture this way: default.aspx.de-CH.resx. For list of supported cultures in .Net Framework return to MSDN.

Read the complete article at C-SharpCorner.com
Read the VB.Net version as VBDotNetHeaven.com

kick it on DotNetKicks.com

ASP.NET AJAX ComboBox

by mosessaur| 06 January 2008| 33 Comments

Back to April 2007 I posted about building an ASP.NET AJAX ComboBox. It was an attempt to rewrite a ComboBox Control I made to fulfil certain issues I faced with 3rd Party Controls. One of those issue was performance as most of 3rd Party control are rendering heavy HTML because of extinsive features they put on their controls which I do not need. So This post is supposed to be an extensions to my old post as well as my article about building Simple ASP.NET ComboBox.

Attached to this post is the ASP.NET AJAX ComboBox. The archive is also containing 3 other very simple controls. The controls are developed using ASP.NET AJAX 1.0. Client Side Controls are written using Script#. I've posted earlier about Script# and my experience with it, so feel free to have a look at that post.

Now back to ASP.NET AJAX ComboBox. The control is very simple, you can consider it as composite control of simple ListBox and TextBox, however it doesn't inherit from CompositeControl. It directly inherit from ListControl to support binding out of the box and many other features that do need any to be rewritten. More...

MSDN Magazine Cutting Edge: ASP.NET AJAX

by mosessaur| 06 November 2007| 0 Comments
Dino Esposito wrote a serious about ASP.NET AJAX on MSDN Magazine Cutting Edge section.
I would like to share these good links with you so here they are:
Have fun!

Expose Stored Procedures to ASP.NET through HTTP Endpoints

by mosessaur| 18 June 2007| 2 Comments

Yesterday DotNetSlackers.com posted a new article authored by Ahmad Mosa. It is about How to Expose Stored Procedures to ASP.NET through HTTP Endpoints. The article shows how to use HTTP endpoints of SQL Server 2005 to publish internal reports to your organization without using IIS Web Server and regardless of heterogeneous systems. Hope you'll like the article.

Ahmad Mosa is an MCT since 2005. He has MCSD.NET for both C# & VB.NET, MCDBA for SQL Server 2000 and MCPD for Enterprise application development (chartered member). Ahmad has been working in the training field for about 5 years and he has attended several overseas training in deferent locations.

kick it on DotNetKicks.com

Tutorial: Getting Started, Creating a WSE 3.0 Enabled Web Service to Transfer Large Amount of Data using WSE 3.0 MTOM

by mosessaur| 11 June 2007| 3 Comments
Just published my artilce about getting started with WSE 3.0 on DotNetSlackers.com. In this article I'm walking through to build simple document transfer web service using ASP.NET 2.0 and make this web serice WSE 3.0 enabled. The article is covering the following topics:
  • How to configure a web service to use WSE 3.0
  • How to configure a client application to use WSE 3.0
  • How to configure a web service to use MTOM messaging mechanism
  • How to enable a client application to use MTOM while communicating with a MTOM enabled web service

As an extension to this article, currently I'm studying how to build WSS 3.0 Web Service to upload documents to document libraries and enable WSE 3.0 on this web service. Hope I could finalize this soon.

Your comments and suggestions are appreciated.

kick it on DotNetKicks.com