Home   |  Articles   |  Resources   |  Humor   |  Feedback

  Login   Register 


.Net related Articles, Code and Resources
Herding Code Last Refreshed 7/24/2008 10:33:47 AM
MSDN: United States Last Refreshed 7/24/2008 10:33:48 AM
United States Global Headlines
Create and Customize Reports for Visual Studio Team Foundation Server
Learn important concepts about working with unfamiliar technologies and get step-by-step instructions on creating and customizing reports for Visual Studio Team Foundation Server.

Code Review: Find and Fix Vulnerabilities Before Your Application Ships
Discover the value of security code reviews performed by developers or security experts, and how an experienced reviewer can spot issues that would be missed by tools.

Manipulate Excel 2007 and PowerPoint 2007 Files with the Open XML Object Model
The Microsoft SDK for Open XML Formats Technology Preview is a library for accessing Open XML Format files. See the Open XML object model code that you can use to access and manipulate Excel 2007 and PowerPoint 2007 files.

Take Advantage of the Security Features in Windows Vista
Protect your customers from malware by creating applications that utilize the many defensive enhancements found in Windows Vista.

Best Practices: Common Coding Issues When Using the SharePoint Object Model
As more developers write custom code by using the SharePoint Object Model, they encounter common issues that can affect application performance. Here is how to identify and correct them.

Extend Windows PowerShell with Custom Commands
Windows PowerShell is a powerful and flexible tool that you can extend by writing your own custom cmdlets. Create three custom cmdlets that allow you to interact with IsolatedStorage.

Get a 90-Day Trial of Visual Studio 2008
Download a fully functional trial of Visual Studio 2008 to evaluate what’s new in this release of Visual Studio.

Build Applications for Facebook with the .NET Compact Framework
Use the .NET Compact Framework to build stand-alone smart device applications that can access Facebook content. The source code accompanying this article demonstrates working with key aspects of the Facebook API and tightly integrating with Microsoft Windows Mobile–specific APIs.

Encapsulate Silverlight with ASP.NET Controls
To implement Silverlight in ASP.NET pages, you can encapsulate your Silverlight elements in ASP.NET controls. Fritz Onion shows you how.

HTTP Programming with WCF and the .NET Framework 3.5

ASP.NET Podcast Last Refreshed 7/24/2008 10:33:49 AM
Podcast
ASP.NET Podcast Show #119 - Using the History (Back) Functionality with the ASP.NET AJAX Web Services in .NET 3.5 Service Pack 1 Beta 1

Subscribe to Everything.

Subscribe to WMV format.

Subscribe to M4V for iPod Users.

Subscribe to MP3 (Audio only).

Download WMV.

Download M4V for iPod Users.

Download MP3 (Audio only).

Download PPT associated file.

Download Source Code.

Show Notes:

Source Code:

     <asp:ScriptManager ID="sm" runat="server"
        EnableHistory="true"
        EnableSecureHistoryState="true" >
        <Services>
            <asp:ServiceReference Path="~/GetMaps.asmx" />
        </Services>
    </asp:ScriptManager>
<script language="javascript" type="text/javascript">
    var Map;
    var userNavigated = false;
    function pageLoad() {
        Sys.Application.add_navigate(onNavigate);

        GetMaps.MapData(SetupMap);

    }

    function onNavigate(sender, e) {
        if (userNavigated) {
            restorePage(e.get_state());
        }
    }

    function restorePage(PageState) {
        var UpperLeftLat = new Number(PageState.UpperLeftLat);
        var UpperLeftLon = new Number(PageState.UpperLeftLon);
        var BottomRightLat = new Number(PageState.LowerRightLat);
        var BottomRightLon = new Number(PageState.LowerRightLon);
        var ZoomLevel = new Number(PageState.ZoomLevel);
        var Lat = (UpperLeftLat + BottomRightLat ) / 2;
        var Lon = (UpperLeftLon + BottomRightLon) / 2;

        if (!(isNaN(Lat) || isNaN(Lon))) {
            Map.LoadMap(new VELatLong(Lat, Lon), ZoomLevel, 'h', false);
            GetMaps.GetPointData(10, UpperLeftLat, UpperLeftLon,
            BottomRightLat, BottomRightLon, GetDataSuccess);
        }
    }

    function SetupMap(result) {
        var Lat = result.Center.Lat;
        var Lon = result.Center.Lon;
        var ZoomLevel = result.ZoomLevel;
        var MapView, TopLeft, BottomRight;
        try {
            Map = new VEMap('MapDiv');
            Map.LoadMap(new VELatLong(Lat, Lon), ZoomLevel, 'h', false);
            MapView = Map.GetMapView();
            TopLeft = MapView.TopLeftLatLong;
            BottomRight = MapView.BottomRightLatLong;
            //TopleftLatLong and BottomRightLatLong return a VELatLong object.
            Map.AttachEvent("onchangeview", MapChangedView);
            SetupHistory();
            GetMaps.GetPointData(10, TopLeft.Latitude, TopLeft.Longitude,
                BottomRight.Latitude, BottomRight.Longitude, GetDataSuccess);
        }
        catch (e) {
            alert("Error: " + e);
        }
    }
    function GetDataSuccess(result) {
        var i = 0;
        var Lat, Lon;
        for (i = 0; i < result.length; i++) {
            Lat = result[i].Location.Lat;
            Lon = result[i].Location.Lon;
            var shape = new VEShape(VEShapeType.Pushpin, new VELatLong(Lat, Lon));
            shape.SetTitle("Title: " + i);
            shape.SetDescription(result[i].Description);
            Map.AddShape(shape);
        }
    }

    function SetupHistory() {
        var PageTitle;
        var now = new Date();
        var CurrentTime = now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds();
        PageTitle = "AJAX History Test Time:" + CurrentTime;
        MapView = Map.GetMapView();
        TopLeft = MapView.TopLeftLatLong;
        BottomRight = MapView.BottomRightLatLong;
        ZoomLevel = Map.GetZoomLevel();
        var PageState =
        {
            "UpperLeftLat": TopLeft.Latitude,
            "UpperLeftLon": TopLeft.Longitude,
            "LowerRightLat": BottomRight.Latitude,
            "LowerRightLon": BottomRight.Longitude,
            "ZoomLevel": ZoomLevel
        }
        userNavigated = false;
        Sys.Application.addHistoryPoint(PageState, PageTitle);
        userNavigated = true;
    }
    function MapChangedView(e) {
        
        Map.DeleteAllShapes();
        MapView = Map.GetMapView();
        TopLeft = MapView.TopLeftLatLong;
        BottomRight = MapView.BottomRightLatLong;
        SetupHistory();

        GetMaps.GetPointData(10, TopLeft.Latitude, TopLeft.Longitude,
        BottomRight.Latitude, BottomRight.Longitude, GetDataSuccess);
        
    }


</script>
    <div id="MapDiv" style="position:relative; width:450px; height: 350px;" ></div>



ASP.NET Podcast Show #118 - Paul on Peer-To-Peer with Windows Communication Foundation

Subscribe to EVERYTHING <-- What you REALLY WANT TO DO!

Subscribe to WMV Video only.

Subscribe to M4V Video only.

Subscribe to MP3 Audio only.

Download WMV.

Download M4V.

Download MP3.

Show Notes:

Download Source Code




The Blogs
Subscribe to the OdeToCode blogs for the latest news, downloads, new articles, and quirky commentary.
New Articles
C# 3.0 and LINQ
C# 3.0 introduced a number of new features for LINQ. In this article we'll examine the new features like extension methods, lambda expressions, anonymous types, and more.

Introduction To LINQ
This article is an introduction to LINQ and provides examples of using LINQ to query objects, XML, and relational data.

What ASP.NET Developers Should Know About JavaScript
This article looks at JavaScript from the perspective of a C# or Visual Basic programmer. See how to apply object oriented techniques to your JavaScript code.

Most Popular Articles
ASP.Net 2.0 - Master Pages: Tips, Tricks, and Traps
MasterPages are a great addition to the ASP.NET 2.0 feature set, but are not without their quirks. This article will highlight the common problems developers face with master pages, and provide tips and tricks to use master pages to their fullest potential.

Table Variables In T-SQL
Table variables allow you to store a resultset in SQL Server without the overhead of declaring and cleaning up a temporary table. In this article, we will highlight the features and advantages of the table variable data type.

AppSettings In web.config
In this article we will review a couple of pratices to keep your runtime configuration information flexible.

Contribute Code
Privacy
Consultancy