<%@dotnet.itags.org. Page Language="C#" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %
<%@dotnet.itags.org. Register Assembly="WCPierce.Web" Namespace="WCPierce.Web.UI.WebControls" TagPrefix="wcp" %
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<atlas:ScriptManager ID="s1" EnablePartialRendering="true" runat="server"/
<div class="SystemTime">
<h1>System Time:</h1>
</div>
<atlas:UpdatePanel ID="p1" runat="server">
<ContentTemplate>
<asp:Buttonrunat="server" ID="ShowTime" Text="Show server's date & time"OnClick="ShowTime_Click" CausesValidation="false" />
<asp:Labelrunat="server" ID="lblShowTime" BackColor="Blue" ForeColor="White">Time</asp:Label>
</ContentTemplate>
</atlas:UpdatePanel
<div class="GoogleMap">
GOOGLE IT!
<wcp:GMap ID="gMap" runat="server" Width="500px" Height="300px" /
</div>
</asp:Content><script language="C#" runat="server">
private void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
gMap.CenterAndZoom(new GPoint(-122.141944F, 37.441944F), 4);
}
}
protected void ShowTime_Click(object sender, EventArgs e)
{
lblShowTime.Text = "This String";//DateTime.Now.ToString();
}
</script>
All this page is supposed to do is allow the user to move around in themap and click on the button which, for now, just showes the system timeon the server without the map refreshing and going back to its center.The map doesn't refresh, but the lable does not post the system time.I've traced the code and it is being executed. What am i missing?does the label show anything ? looks like it should say "This String"
Sorry, yes, it should say "This String" instead of system time. However, it doesn't. If I remove the google map it works fine.
0 comments:
Post a Comment