As the user types zip codes in the textbox, it saves them into their profile, creating
a dynamic AutoComplete experience specific to the user!
 | ASPX |
|
 | CS |
|
1 <%@ Page Language="C#" MasterPageFile="~/MasterPages/SamplePageWithCode.master"
2 AutoEventWireup="true" CodeFile="04b_WeatherGadgetProfile.aspx.cs"
3 Inherits="_05_OtherSamples_04b_WeatherGadgetProfile"
4 Title="Weather.com Gadget w/Profile" %>
5 <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
6 <div>
7 As the user types zip codes in the textbox, it saves them into their profile, creating
8 a dynamic AutoComplete experience specific to the user!<br />
9 <br />
10 <atlas:UpdatePanel ID="WeatherGadget" runat="server" Mode="conditional">
11 <ContentTemplate>
12 <table border="0" cellpadding="2" cellspacing="0" style="border:solid 1px black">
13 <tr>
14 <td nowrap align="center">
15 <asp:Label ID="CityTitle" runat="server"></asp:Label></td>
16 </tr>
17 <tr>
18 <td valign="top">
19 <table border="0" cellpadding="0" cellspacing="0">
20 <tr>
21 <td nowrap>
22 <asp:Image ID="ImageIcon" Width="128" Height="128" runat="server" /></td>
23 <td>
24 <asp:Label ID="Temperature" runat="server" CssClass="temp"></asp:Label>°F</td>
25 </tr>
26 </table>
27 </td>
28 </tr>
29 <tr>
30 <td>
31 <table border="0" cellpadding="3" cellspacing="0">
32 <tr>
33 <td nowrap>
34 <b>Current Conditions:</b></td>
35 <td>
36 <asp:Label ID="Conditions" runat="server"></asp:Label></td>
37 </tr>
38 <tr>
39 <td nowrap>
40 <b>Feels Like:</b></td>
41 <td>
42 <asp:Label ID="FeelsLike" runat="server"></asp:Label></td>
43 </tr>
44 <tr>
45 <td nowrap>
46 <b>Humidity:</b></td>
47 <td>
48 <asp:Label ID="Humidity" runat="server"></asp:Label>%</td>
49 </tr>
50 <tr>
51 <td nowrap>
52 <b>Updated:</b></td>
53 <td>
54 <asp:Label ID="LastUpdated" runat="server"></asp:Label></td>
55 </tr>
56 </table>
57 </td>
58 </tr>
59 <tr>
60 <td style="border-top: solid 1px black; text-align:center; vertical-align:middle" align="center" valign="middle">
61 <asp:TextBox ID="ZipCode" runat="server"></asp:TextBox> <asp:Button ID="RefreshData" runat="server" Text="Get Weather" OnClick="GetWeather_OnClick" />
62 <atlas:AutoCompleteExtender ID="ZipComplete" runat="server">
63 <atlas:AutoCompleteProperties Enabled="true" ServiceMethod="GetCities" ServicePath="~/CityLocations.asmx" TargetControlID="ZipCode" />
64 </atlas:AutoCompleteExtender>
65 </td>
66 </tr>
67 <tr>
68 <td style="border-top: solid 1px black; text-align:center; vertical-align:middle" align="center" valign="middle">
69 <asp:Image ID="Image1" ImageUrl="~/Images/weather/logos/TWClogo_32px.png" runat="server" /> <span style="font-size:x-small">Weather data provided by <a href="http://weather.com">Weather.com</a></span>.
70 </td>
71 </tr>
72 </table>
73 </ContentTemplate>
74 <Triggers>
75 <atlas:ControlEventTrigger ControlID="RefreshData" EventName="Click" />
76 </Triggers>
77 </atlas:UpdatePanel>
78 </div>
79 </asp:Content>
|
|