Overlib Custom Controls using WebResource Files
2008-12-27 20:49
281 查看
ref: http://www.codeproject.com/KB/scripting/OverlibDemo.aspx
This article describes an encapsulation of an existing JavaScript popup library using ASP.NET custom controls with the script being provided to the page directly from an assembly using a WebResource (.axd) stream.
Some background on the script library will be given, along with how to use the WebResource technique to eliminate having to manually deploy the script on your website or to dynamically modify the web.config and site structure at design time to accomplish the same end.
Lastly some examples of extending standard ASP.NET controls such as the button, link button and image will be demonstrated, illustrating how easy it is to use the scripts, in conjunction with a script manager control which is placed on the page at design time.
The demonstration code uses VS 2005 SP1 to take advantage of Web Applications, and the sample code is written with C#, so make sure you have both.
This article describes an encapsulation of an existing JavaScript popup library using ASP.NET custom controls with the script being provided to the page directly from an assembly using a WebResource (.axd) stream.
Some background on the script library will be given, along with how to use the WebResource technique to eliminate having to manually deploy the script on your website or to dynamically modify the web.config and site structure at design time to accomplish the same end.
Lastly some examples of extending standard ASP.NET controls such as the button, link button and image will be demonstrated, illustrating how easy it is to use the scripts, in conjunction with a script manager control which is placed on the page at design time.
The demonstration code uses VS 2005 SP1 to take advantage of Web Applications, and the sample code is written with C#, so make sure you have both.
相关文章推荐
- [转]Creating Custom Web Controls in C# Stats(演示了如何创建一个导航条)
- Add custom and listview web part to wiki page using powershell
- Using resource files in SharePoint 2010
- Creating Custom Web Controls in C# Stats(转)
- using WebRequest to get resource in the internet
- 对 Web user controls 和 Web custom controls 的一些建议
- Creating Custom Configuration Sections in Web.config Using .NET 2.0's Configuration API
- Using files from web applications
- Neat Stuff to Do in List Controls Using Custom Draw
- ?Personal Web Site--Security trimming using the menu controls
- Using files from web applications
- Web user controls 和 Web custom controls
- Using Dropbox files in ArcGIS Online web maps
- resource files are useful in web apps
- Using freewheel.labs.autodesk.com to auto generate preview images of DWF files on your web site
- Using WebResource.axd for embedded resources
- Asp.Net Globalization and Localization using Local Resource files and Global Resource files
- Creating Custom Configuration Sections in Web.config Using .NET 2.0's Configuration API
- Referencing JS files using CustomAction element
- Personalizing Using Web Parts->Introducing Web Part Controls