By Nathan Blevins:
The participants
were: Ben Farmer, Dylan Wolf, Jenny Farmer, Joe Simpson, and I(Nathan Blevins).
Basically, we took on two projects. Our main project was
WonderPuzzle.com. This site is dedicated to those individuals who have
children with disabilities that cannot be diagnosed by doctors. It
gives
them a site to discuss, become more informed, and to share their own
stories.
Our main job was revamping the site's look as well as porting the
current site
from dot Net Nuke to Sitefinity CMS. The new site has yet to be pushed
live but you can find the current one at the .com address. Also, we
assisted the Ann Arbor Hands On Museum Project by acting as a reference
for PHP
issues. Dylan worked very diligently with them and did an excellent
job. Finally, although Mike was unable to participate, he dropped by
long
enough to give everyone a Best Buy gift card and to thank them for
helping out.
Although everything started off pretty rocky, I think everything worked out to
a good end.
Pics from the event on Saturday.
Nathan Blevins
Subscribe to Everything.
Original Url: http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2008/07/01/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.aspx
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>
What is the INETA Community Champions (Champs) Program?
INETA has partnered with Microsoft and Community Credit to offer INETA members the
Community Champions Program. We want to recognize, encourage and reward the
developers who routinely devote their time, expertise and passion to the benefit
of the community.
As we all know, volunteers are the heart of INETA and of our user groups. We all
benefit from their passion for technology and their dedication to helping
others. People like our officers, newsletter contributors, presenters and all
those who pitch in to make the meetings run smoothly. Every person makes a
difference ... YOU make a difference.
If you take a moment to add it all up, you would be surprised by what it takes to
make things happen ... and by how much INETA members are doing every day. That is
where the INETA Community Champions program comes in. The Champs program is
designed to help recognize what volunteers are doing, including the many tasks that others
may not even be aware of. It allows volunteers to record their contributions,
to see what others are doing, and to be inspired by the results. The
program also provides two very special recognition processes, the
Community Champion Award
and the
Community Excellence Award.
Community Champions Award
Once a quarter, INETA will recognize leading
contributors as
Community Champions. In addition to claiming this
prestigious title for twelve months, awardees also receive a letter of
commendation, a certificate of achievement, much deserved online recognition,
and a few great prizes. Of course, we want this award to motivate even more
involvement, so we encourage everyone, including winners, to record your
activities. After all, you are eligible to win every twelve months.
Find out
more and
see what others are doing.
Community Excellence Award
In recognition of their lifetime
achievements, INETA is proud to present our most dedicated leaders with the
Community Excellence Award. You know the people that we mean, so we are
counting on YOU to start the award process by nominating them for this elite
honor. These are the outstanding individuals who, year after year, have gone
above and beyond to lay the foundation and provide the structure for building
our community and to keep it vibrant and growing. They step up when called upon;
they are our leaders and mentors; they inspire us to stretch our horizons; and
they help provide us with resources along the way. Read about past recipients
and find out more about the award.
Subscriptions & Downloads
Subscribe to everything.
Back to the original url on the ASP.NET Podcast site.
Subscribe to WMV.
Subscribe to M4V for iPod.
Subscribe to MP3.
Download WMV.
Download M4V for iPod.
Download MP3.
Show Notes:
Images:
This is the UpdatePanel with EnableSecureHistoryState set to true
This is the UpdatePanel with EnableSecureHistoryState set to false.

Source Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UpdatePanelHistory.aspx.cs" Inherits="UpdatePanelHistory"
%>
<!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 runat="server">
<title>UpdatePanel
History Button</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="scm" runat="server"
EnableHistory="true"
OnNavigate="scm_Navigate"
/>
<div>
<asp:Button ID="btnSubmit" runat="server" Text="Click Me!"
onclick="btnSubmit_Click" />
<asp:UpdatePanel ID="upl" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="lblTime" runat="server" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using
System.Collections.Specialized;
public partial
class UpdatePanelHistory
: System.Web.UI.Page
{
protected void Page_Load(object
sender, EventArgs e)
{
}
protected void scm_Navigate(object
sender, HistoryEventArgs he)
{
NameValueCollection
pageState = he.State;
string
dtS;
if
(pageState != null)
{
dtS = pageState.Get("Time");
if
(!String.IsNullOrEmpty(dtS))
{
lblTime.Text = dtS;
}
else
{
lblTime.Text = String.Empty;
}
upl.Update();
}
}
protected void btnSubmit_Click(object
sender, EventArgs e)
{
string
dtS = DateTime.Now.ToString();
lblTime.Text = dtS;
if
((scm.IsInAsyncPostBack == true) &&
(scm.IsNavigating != true))
{
AddHistoryPoint(dtS);
}
}
private void AddHistoryPoint(string
HistoryPoint)
{
NameValueCollection
pageState = new NameValueCollection();
pageState.Add("Time",
HistoryPoint);
scm.AddHistoryPoint(pageState, "Time:" + HistoryPoint);
}
}