| In this topic, we will explain in detail that how can developers use Aspose.Cells.GridWeb in their ASP.NET applications using Visual Studio.NET 2005. We will illustrate all steps with the help of related screenshots to make the learning process easier for developers. This topic is useful for the beginner level of developers working with Aspose.Cells.GridWeb. |
Working with Aspose.Cells.GridWeb Using VS.NET 2005
We will learn making use of Aspose.Cells.GridWeb by making a sample website in Visual Studio.NET 2005. For the sake of better understanding, we have divided the process of creating this sample website into steps.
Step 1: Creating New Web Site
Please open your VS.NET 2005 IDE. After the IDE is opened, select Web Site... option from File | New menu of the VS.NET 2005 IDE as shown below in the figure:

Figure: Selecting Web Site... option from the menu
Once you select Web Site... option, a New Web Site dialog will be opened before you. Select ASP.NET Web Site from Visual Studio installed templates and choose HTTP mode for the Location of the web site as shown below in the figure:

Figure: Selecting HTTP mode for the web site location
After selecting the HTTP mode for your web site, now you need to specify a proper location where your web site files will be created and stored. So, please click Browse... button of your New Web Site dialog as shown below in the figure:

Figure: Clicking Browse... button to specify the location of your web site
Clicking Browse... button will open Choose Location dialog for you. Here, click the Local IIS tab on left side of the dialog and it will display all folders and web applications stored in your IIS root folder (For example: C:\Inetpub\wwwroot) as shown below in the figure:

Figure: Selecting Local IIS as your web site location
Now, you need to create a new web application in your Local IIS where your web site files will be stored. Choose Location dialog supports creating & deleting web applications or virtual directories in your Local IIS . To create a web application, click on a button as shown below in the figure:

Figure: Creating new web application at your Local IIS
In the above screenshot, you would notice that when the button is clicked, a new web application with the default name of WebSite is created for you. Now, you can rename the web application according to your desire. In our case, we renamed it to GridWebOn2005 . Now, click Open button as shown below:

Figure: Clicking Open button after renaming web application
After clicking Open button, you will be moved back to the previous New Web Site dialog. But, this time, you would notice that the path of web site location is set to *http://localhost/GridWebOn2005* as we created. Now, click OK button (to let VS.NET create a web site for you) as shown below in the figure:

Figure: Clicking OK to create a web site
Step 2: Checking Source & Design Views of a Web Page
After clicking the OK button, a default web site will be created for you by VS.NET 2005 containing a default.aspx ' web page and following interface will be experienced by you:

Figure: Source view of default.aspx page
All web pages (including ASP.NET) can be opened in two modes. One is Source view that lets developers access and modify the source code of the web page while the second one is Design view that can be used by developers to design their web pages in a WYSIWYG manner. The above screenshot represents the Source view of default.aspx web page. To view the Design view of the same web page, you can click on the Design button at the bottom of the VS.NET IDE as shown below in the figure:

Figure: Design view of default.aspx page
Step 3: Adding Aspose.Cells.GridWeb to Web Page
You can simply add Aspose.Cells.GridWeb (or GridWeb ) control to your web page by dragging it from your Toolbox to web page. If you don't know about how to add Aspose.Cells.GridWeb to your Toolbox , please refer to Integrate Aspose.Cells Grid Controls with Visu a l Studio.NET. Using that topic, you can add GridWeb to your Toolbox as shown below in the figure:

Figure: Dragging GridWeb control from Toolbox and dropping to web page
Once GridWeb control is dropped to web page, it would render like this:

Figure: GridWeb control on web page
Step 4: Change the <!DOCTYPE> tag:
When you will add GridWeb control to your web page, you can change the width and height of the GridWeb control. There is an element type, i.e.., <!DOCTYPE> , switch to Source view of the web page and find the following <!DOCTYPE> tag in the source code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Once you find that tag, you may select that complete tag in the source code as shown below:

Figure: Selecting <!DOCTYPE> tag
You can retain, change or delete that <!DOCTYPE> tag from the source code (if required).
You can modify the above <!DOCTYPE> tag with the following one for your need too:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Step 5: Resizing Aspose.Cells.GridWeb Control
If you switch to Design view of the web page, you cannot only resize the width but also the height of the GridWeb . In the screenshot shown below, we have resized GridWeb to a decent size.

Figure: Resizing GridWeb
Step 6: Configuring the Properties of Aspose.Cells.GridWeb
You can easily configure the properties of Aspose.Cells.GridWeb in a WYSIWYG manner by clicking on the Properties button on the right side of VS.NET 2005 IDE. When you click Properties button, a Properties pane will become visible as shown below:

Figure: Configuring GridWeb properties using Properties pane
Properties pane offers developers to not only configure the look & feel of the GridWeb but also some other properties to control the behavior of GridWeb .
Step 7: Running Your First Web Site Containing Aspose.Cells.GridWeb
Finally, you can build and run your web site. You can also run your web site directly from VS.NET 2005 by pressing Ctrl+F5 or clicking Start Debugging button as shown below in the figure:

Figure: Clicking Start Debugging button to build and run web site
After clicking Start Debugging button, you might notice the following dialog:

Figure: Debugging Not Enabled dialog
Well, as we didn't enable debugging in the Web.config file of our web site so, VS.NET 2005 IDE may ask you to enable or disable debugging through the above dialog. In our case, we would like to run it without debugging. So, we selected Run without debugging option from the menu and clicked OK . Now, you can see your web site running in your browser. Now, you can start playing with GridWeb control as shown below in the figure:

Figure: GridWeb control in action Describes how to integrate Aspose.Grid with Visual Studio.NET.

