Telerik blogs

Latest

  • Web ASP.NET AJAX

    Force update of an ASP.NET AJAX UpdatePanel using JavaScript

    Since the beginning of ASP.NET AJAX era I have seen very few examples on how to manually force update of an ASP.NET AJAX UpdatePanel using JavaScript and I have decided to post very simple approach how to do this. First of all you will need to create your own UpdatePanel which will inherit from the original ASP.NET AJAX UpdatePanel and will implement IPostBackEventHandler interface: Now you can call explicitly Update() method of the UpdatePanel: ... and that's it! :-) ... however we can extend this control with an event which will be raised on explicit updates: Now you can use the new UpdatePanel in your pages like this: Enjoy!
  • Web

    Working with Zip Files: Part II, Zipping Files

    In part one, we looked at how you can use RadUpload and the open source SharpZipLib to easily upload and expand zip archives. Today, we'll look at the other end of the process: creating new zip files on the server and then making them available for users to download. To do this, we'll extend the sample we created in part one. As you recall, our sample already enables users to upload a zip file that contains image files and then the server automatically extracts all images to a target directory. We'll extend this demo by creating a text file and then zipping...
    July 13, 2007
  • Web

    Working with Zip files: Part I, Uploading and Expanding

    Have you ever wondered how hard it would be to automatically zip and unzip archives with ASP.NET? It may be easier than you think thanks to the powerful SharpZipLib open source library. This library provides you with a number of easy to use tools for working with Zip (and GZip, Tar, and BZip2, for that matter) archives in .NET code that make the task of creating and expanding compressed archives relatively easy. Today we're going to look at how you can use RadUpload and SharpZipLib to upload a Zip archive and then expand it on the server. For our scenario, let's pretend...
    July 10, 2007
  • Web ASP.NET AJAX

    Hierarchical data sources and RadControls

    In his recent post Bertrand Le Roy announced that he migrated his ObjectHierarchicalDataSource and CompositeHierarchicalDataSource controls from GotDotNet to CodePlex. I just downloaded the sample projects and tried binding RadMenu and RadTreeView to those data source controls. Everything went according to plan: I’ve made two demo web sites – ObjectHierarchicalDataSource.zip and CompositeHierarchicalDataSource.zip. Feel free to check them...
  • Web

    ScriptResource.axd and and assemblies built in the future

    Here is something I didn't know until recently:If you have a ScriptControl whose JavaScript files are web resources (served through ScriptResource.axd instead of WebResource.axd) and the date of the assembly is in the future, that very JavaScript file will fail to load. I have attached a test solution to illustrate the case - AssemblyInTheFuture.zip. Build it and run the Default.aspx page - everything is fine and a nasty alert saying "initialize" pops out. Now change the date of your PC - set it to yesterday. Stop ASP.NET Development server to reset the script resource cache dependency. Open Default.aspx again (but...