Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.








Sys.Services.ProfileServiceTutorial Sample


<%@ Page Language="C#" %>

<html xmlns="" >
<head runat="server">

    <title>Using Profile Service</title>
   <style type="text/css">
        body {  font: 11pt Trebuchet MS;
                font-color: #000000;
                padding-top: 72px;
                text-align: center }

        .text { font: 8pt Trebuchet MS }

    <form id="form1" runat="server">
        <asp:ScriptManager runat="server" ID="ScriptManagerId">
                <asp:ScriptReference Path="Profile.js" />
		<div id="loginId" style="visibility:visible">
			<table id="loginForm">
					<td><input type="text" 
					    id="userId" name="userId" value=""/></td>
					<td><input type="password" 
					    id="userPwd" name="userPwd" value="" /></td>
					<td><input type="button" 
					    id="login" name="login" value="Login" 
					        onclick="OnClickLogin()" /></td>
		        Please use one of the following [username, password] combinations:<br />
		        [user1, u$er1] <br/>
		        [user2, u$er2] <br/> 
		        [user3, u$er3] 
		<div id="setProfProps" style="visibility:hidden">
			<input type="button" 
			value="Set Profile Properties" 
		<div id="placeHolder" style="visibility:visible" />
		<br />
	    <input id="logoutId" type="button" 
	        value="Logout"  style="visibility:hidden"
	    onclick="OnClickLogout()" />
		<div id="setProfileProps" style="visibility:hidden">
					<td>Foreground Color</td>
					<td><input type="text" id="fgcolor" 
					name="fgcolor" value=""/></td>
					<td>Background Color</td>
					<td><input type="text" id="bgcolor" 
					    name="bgcolor" value="" /></td>
					<td><input type="button" 
					id="saveProf" name="saveProf" 
					value="Save Profile Properties" 
					onclick="SaveProfile();" /></td>