Upgrading Internet Explorer WebControls
And When Do I Have to Compile My Pages?
October 30, 2009
AskMicrosoft
UpgradingInternet Explorer WebControls
AndWhen Do I Have to Compile My Pages?
By Rob Howard
We vehad some great questions for the Ask Microsoft column. This month s questionsconcern the Microsoft Internet Explorer WebControls and page compilation.
AfterI upgraded Visual Studio .NET from Beta 2 to the final version released tomanufacturing, my previous Microsoft Internet Explorer WebControls stoppedworking, and my toolbox setting was gone. When I reset the toolbox, I got anerror message. Our project uses the Internet Explorer WebControls TreeView formheavily. Without it, we will lose the work we did with beta versions throughoutthe past few months. Please help us work out this problem. Dr. Xiaoning Yu
ASP.NETsupports a very rich declarative programming model known as server controls.They allow the developer to author code declaratively. This is a sample of the DataGrid,a common server control that ships with ASP.NET:
Developerscan bind data sources, such as data readers or data sets, to the DataGrid control.Also, Visual Studio .NET has fantastic support for ASP.NET server controls,with both drag-and-drop support and statement completion. However, you shouldnote that Visual Studio .NET is not a requirement for using ASP.NET servercontrols.
Theserver controls to which you refer, the Microsoft Internet ExplorerWebControls, are a specialized set of ASP.NET server controls developed byMicrosoft s Internet Explorer team. These controls are declared within ASP.NETpages but render DHTML specific to Internet Explorer, to leverage featuresoffered only to Internet Explorer users. The server controls that ship withASP.NET are all browser-agnostic, but there are many scenarios in whichleveraging client- and browser-specific features is a necessity, such as a TreeView.
Thereason you re having this problem is that the Internet Explorer WebControlswere updated only recently (on January 23) to the ASP.NET version released tomanufacturers. The final version of these server controls is available in thenew ASP.NET server control gallery at http://www.asp.netin the Control Gallery tab and the IE WebControls category. The direct URL is http://www.asp.net/ControlGallery/default.aspx?Category=38&tabindex=2
If Iwrite code for an ASP.NET page (a file with the extension aspx) in any texteditor, such as Notepad instead of Visual Studio .NET, will I have to compileit? Anonymous
You donot need Visual Studio .NET to build and run ASP.NET pages, but it is the bestintegrated development environment for building ASP.NET applications. By usingVisual Studio .NET, you get features such as integrated debugging, codecompletion, integrated help, syntax highlighting, and many other features thatare obviously not available in Notepad. (As an aside, for those of you familiarwith the term Visual InterDev developers use to describe Notepad, VisualNotepad, many of these same Notepad developers now affectionately refer toNotepad as Notepad .NET.)
Theanswer to your question is no and yes.
ASP.NETsupports two types of development:
In-line All elements of the page (such as code, HTML, server controls, andclient-side code) are within the same physical file, the aspx file. This issimilar to how developers wrote classic pages. However, this sometimes is adrawback because all the server code was tied so closely to the HTML.
Code-behind The server code is stored in a separate file from the HTML, server controls,and client-side code. This is the default behavior of any ASP.NET page createdin Visual Studio .NET.
When thecode is in-line, it is declared in tags. When the page is firstrequested, any code found within these tags is compiled automatically. Thus,any developer can write an ASP.NET page using any text-editing tool, includingHomeSite, Notepad, Visual Studio .NET, and Visual InterDev. In this in-linescenario, the developer does not need to compile any resources for the page towork as expected.
When thecode is stored apart from the aspx file in a separate source file, it isconsidered to be in code-behind mode. When in code-behind, the source fileassociated with the aspx page must be compiled, either by Visual Studio .NET orby using the command line compilers that come free as part of the .NETFramework.
Thus,whether you have Visual Studio .NET or any other editor, you can write ASP.NETpages. The code driving those pages can be in-line, whereby no compilation isrequired of the developer; or it can be code-behind, which requires thedeveloper to compile the code before deploying it to the server.
Tosubmit questions for the Ask Microsoft column, send e-mail to [email protected] addition to answering questions in each issue, we ll send an ASP.NET T-shirtto the person who submits the best question.
Rob Howardis a program manager on the ASP.NET team. He also writes the MicrosoftDeveloper Network s Nothing but ASP.NET column and is a co-author of Professional ASP.NET,from Wrox.
Tell us what you think! Please send any comments about thisarticle to [email protected] include the article title and author.
About the Author
You May Also Like