Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » Ajax » Atlas » Downloads
 
Add your own
alternative version

Build a Google IG like AJAX Start Page in 7 days using ASP.NET AJAX and .NET 3.0

, 10 Mar 2010 CPOL
Build a Start Page similar to Google IG in 7 nights using ASP.NET AJAX, .NET 3.0, LINQ, DLinq, and XLinq.
dashboard.zip
src
bin
AjaxControlToolkit.dll
CustomDragDrop
Dashboard
App_Code
App_Data
App_Themes
Default
google.gif
HeaderBack.PNG
Logo.png
max_blue.gif
max_blue_highlight.gif
min_blue.gif
min_blue_highlight.gif
x_blue.gif
x_blue_highlight.gif
Bin
AjaxControlToolkit.dll
CSharp3CodeDomProvider.dll
Global.asax
indicator.gif
vwd.webinfo
Widgets
FlickrIcon.gif
rss.gif
DashboardBusiness
Activities
CreateDeafultWidgetsOnPageActivity.rules
DashboardBusiness.csproj.user
NewUserSetupWorkflow.rules
Properties
UserVisitWorkflow.rules
DashboardData
Properties
Dashboard.bak
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Theme="Default" EnableSessionState="False"  %>
<%@ Register Src="Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="Footer.ascx" TagName="Footer" TagPrefix="uc2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Assembly="CustomDragDrop" Namespace="CustomDragDrop" TagPrefix="cdd" %>
<%@ Register Src="WidgetContainer.ascx" TagName="WidgetContainer" TagPrefix="widget" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>It's not real Google IG!</title>
    <script type="text/javascript">
    function WidgetDropped( container, item, position )
    {
        var instanceId = parseInt(item.getAttribute("InstanceId"));
        var columnNo = parseInt(container.getAttribute("columnNo"));
        var row = position;
        
        //alert( container.id + ": " + item.id + ": " + position + ": " +  );
        WidgetService.MoveWidgetInstance( instanceId, columnNo, row );
    }
    function $hide(id)
    {
        document.getElementById(id).style.display="none";
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
            
        <!-- Render header first so that user can start typing search criteria while the huge runtime and other scripts download -->
        <uc1:Header ID="Header1" runat="server" />

        <!-- TODO: Show update progress -->
        <div id="body">
        
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">        
            <Services>
                <asp:ServiceReference InlineScript="true" Path="WidgetService.asmx" />                
            </Services>
        </asp:ScriptManager>
        
        <asp:UpdatePanel ID="AddContentUpdatePanel" runat="server" UpdateMode="conditional">
        <ContentTemplate>
            <asp:LinkButton CssClass="add_stuff_toggle" ID="ShowAddContentPanel" runat="server" Text="Add stuff �" OnClick="ShowAddContentPanel_Click"/>
            <asp:LinkButton CssClass="add_stuff_toggle" ID="HideAddContentPanel" runat="server" Text="Hide Stuff" OnClick="HideAddContentPanel_Click" Visible="false" />
            
            <asp:Panel ID="AddContentPanel" runat="Server" CssClass="widget_showcase" Visible="false">
            <div style="float:left"><b>Click on any of the item to add it to your page.</b></div>
            <div style="float:right"><asp:LinkButton ID="WidgetListPreviousLinkButton" runat="server" Visible="false" Text="&lt; Previous" OnClick="WidgetListPreviousLinkButton_Click" /> | <asp:LinkButton ID="WidgetListNextButton" runat="server" Visible="false" Text="Next &gt;" OnClick="WidgetListNextButton_Click" /></div>
            <br /><br />
                <asp:DataList ID="WidgetDataList" runat="server" RepeatDirection="Vertical" RepeatColumns="5" RepeatLayout="Table" CellPadding="3" CellSpacing="3" EnableViewState="False" ShowFooter="False" ShowHeader="False">
                    <ItemTemplate><asp:Image ID="Icon" ImageUrl='<%# Eval("Icon") %>' ImageAlign="AbsMiddle" runat="server" />&nbsp;<asp:LinkButton CommandArgument='<%# Eval("ID") %>' CommandName="AddWidget" ID="AddWidget" runat="server"><%# Eval("Name") %></asp:LinkButton></ItemTemplate>
                </asp:DataList>
            </asp:Panel>            
            <ajaxToolkit:AnimationExtender ID="AddContentPanelAnimation" runat="server" TargetControlID="AddContentPanel">
                <Animations>
                    <OnLoad>
                        <FadeIn minimumOpacity=".2" />
                    </OnLoad>
                </Animations>
            </ajaxToolkit:AnimationExtender>
        </ContentTemplate>
        </asp:UpdatePanel>
        
        <asp:UpdatePanel ID="TabUpdatePanel" runat="server" UpdateMode="conditional">
        <ContentTemplate>
            <div id="tabs">
            <ul class="tabs" runat="server" id="tabList"><li class="tab inactivetab"><asp:LinkButton id="Page1Tab" runat="server" Text="Page 1"></asp:LinkButton></li><li class="tab activetab"><asp:LinkButton id="Page2Tab" runat="server" Text="Page 2"></asp:LinkButton></li>
            </ul>            
            </div>        
        </ContentTemplate>
        </asp:UpdatePanel>
        
        <asp:UpdatePanel ID="WidgetViewUpdatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
        <table width="98%" cellspacing="10" border="0" align="center" class="table_fixed" height="100%">
            <tbody>
                <tr>
                    <td class="column">
                        <asp:Panel ID="LeftPanel" runat="server"  class="widget_holder" columnNo="0">
                            <div id="DropCue1" class="widget_dropcue">
                            </div>
                        </asp:Panel>
                    </td>
                    <td>
                        &nbsp;</td>
                    <td class="column">
                        <asp:Panel ID="MiddlePanel" runat="server" class="widget_holder" columnNo="1">
                            <div id="DropCue2" class="widget_dropcue">
                            </div>
                        </asp:Panel>
                    </td>
                    <td>
                        &nbsp;</td>
                    <td class="column">
                        <asp:Panel ID="RightPanel" runat="server" class="widget_holder" columnNo="2">
                            <div id="DropCue3" class="widget_dropcue">
                            </div>
                        </asp:Panel>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
            </tbody>
        </table>
        
        <cdd:CustomDragDropExtender ID="CustomDragDropExtender1" runat="server" TargetControlID="LeftPanel"
            DragItemClass="widget" DragItemHandleClass="widget_header" DropCueID="DropCue1"
            DropCallbackFunction="WidgetDropped" />
        <cdd:CustomDragDropExtender ID="CustomDragDropExtender2" runat="server" TargetControlID="MiddlePanel"
            DragItemClass="widget" DragItemHandleClass="widget_header" DropCueID="DropCue2" 
            DropCallbackFunction="WidgetDropped" />
        <cdd:CustomDragDropExtender ID="CustomDragDropExtender3" runat="server" TargetControlID="RightPanel"
            DragItemClass="widget" DragItemHandleClass="widget_header" DropCueID="DropCue3" 
            DropCallbackFunction="WidgetDropped" />
        
        </ContentTemplate>
        </asp:UpdatePanel>        
        
        </div>
        <!--<textarea id="TraceConsole" rows="10" cols="80"></textarea>-->
        <hr />
        
        
        <uc2:Footer runat="server"></uc2:Footer>
    </form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Omar Al Zabir
Architect BT, UK (ex British Telecom)
United Kingdom United Kingdom

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.1411022.1 | Last Updated 10 Mar 2010
Article Copyright 2007 by Omar Al Zabir
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid