Posted by John Lockwood on October 27th, 2009
-
Implement Web Forms by using ASP.NET AJAX. May include but is not limited to: EnablePartialRendering, Triggers, ChildrenAsTriggers, Scripts, Services, UpdateProgress, Timer, ScriptManagerProxy
-
Interact with the ASP.NET AJAX client-side library. May include but is not limited to: JavaScript Object Notation (JSON) objects; handling ASP.NET AJAX events
-
Consume services from client scripts.
-
Create and register client script. May include but is not limited to: inline, included .js file, embedded JavaScript resource, created from server code
Posted in Working with ASP.NET AJAX and Client-Side Scripting | Add a comment »
Posted by John Lockwood on October 23rd, 2009
-
Customize the layout and appearance of a Web page. May include but is not limited to: CSS, Themes and Skins, Master Pages, and Web Parts, App_Themes, StyleSheetTheme
-
Work with ASP.NET intrinsic objects. May include but is not limited to: Request, Server, Application, Session, Response, HttpContext
-
Implement globalization and accessibility. May include but is not limited to: resource files, culture settings, RegionInfo, App_GlobalResources, App_LocalResources, TabIndex, AlternateText , GenerateEmptyAlternateText, AccessKey, Label.AssociatedControlID
-
Implement business objects and utility classes. May include but is not limited to: App_Code , external assemblies
-
Implement session state, view state, control state, cookies, cache, or application state.
-
Handle events and control page flow. May include but is not limited to: page events, control events, application events, and session events, cross-page posting; Response.Redirect, Server.Transfer, IsPostBack, setting AutoEventWireup
-
Implement the Generic Handler.
Posted in Programming Web Applications | Add a comment »
Posted by John Lockwood on October 19th, 2009
-
Access device capabilities. May include but is not limited to: working with emulators
-
Control device-specific rendering. May include but is not limited to: DeviceSpecific control; device filters; control templates
-
Add mobile Web controls to a Web page. May include but is not limited to: StyleSheet controls; List controls; Container controls
-
Implement control adapters. May include but is not limited to: App_Browsers; rendering by using ChtmlTextWriter or XhtmlTextWriter
Posted in Targeting Mobile Devices | Add a comment »
Posted by John Lockwood on October 15th, 2009
-
Implement data-bound controls. May include but is not limited to: DataGrid, DataList, Repeater, ListView, GridView, FormView, DetailsView, TreeView, DataPager
-
Load user controls dynamically.
-
Create and consume custom controls. May include but is not limited to: registering controls on a page, creating templated controls
-
Implement client-side validation and server-side validation. May include but is not limited to: RequiredFieldValidator, CompareValidator, RegularExpressionValidator, CustomValidator, RangeValidator
-
Consume standard controls. May include but is not limited to: Button, TextBox, DropDownList, RadioButton, CheckBox, HyperLink, Wizard, MultiView
Posted in Consuming and Creating Server Controls | 4 Comments »
Posted by John Lockwood on October 11th, 2009
-
Configure providers. May include but is not limited to: personalization, membership, data sources, site map, resource, security
-
Configure authentication, authorization, and impersonation. May include but is not limited to: Forms Authentication, Windows Authentication
-
Configure projects, solutions, and reference assemblies. May include but is not limited to: local assemblies, shared assemblies (GAC), Web application projects, solutions
-
Configure session state by using Microsoft SQL Server, State Server, or InProc. May include but is not limited to: setting the timeout; cookieless sessions
-
Publish Web applications. May include but is not limited to: FTP, File System, or HTTP from Visual Studio
-
Configure application pools.
-
Compile an application by using Visual Studio or command-line tools. May include but is not limited to: aspnet_compiler.exe, Just-In-Time (JIT) compiling, aspnet_merge.exe
Posted in Configuring and Deploying Web Applications | Add a comment »
Posted by John Lockwood on October 7th, 2009
This short sample shows different ways to read and write binary files and text files. In particular, note the two different techniques for reading and writing text files.
<pre>using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
// This sample demonstrates simple techniques for reading and writing text and binary files
class SimpleFileIO
{
static void Main(string[] args)
{
try
{
SimpleFileIO sfio = new SimpleFileIO();
// Step into each of these functions to see how to read / write
// different types of files.
sfio.TextFilesOneWay();
sfio.TextFilesAnotherWay();
sfio.BinaryFiles();
}
catch (Exception e)
{
Console.WriteLine(e.Message + "\n" + e.StackTrace);
}
finally
{
Console.WriteLine("\nPress any key to continue...");
Console.ReadKey();
}
}
void TextFilesOneWay()
{
// Use the constructor of the StreamWriter and StreamReader
// classes to use a read and write text files
string filename = "SimpleFileIO_hello.txt";
StreamWriter sw = new StreamWriter(filename);
sw.WriteLine("Hello world");
sw.Close();
// Same technique to read it back
StreamReader sr = new StreamReader(filename);
string contents = sr.ReadLine();
sr.Close();
// Prove it
Console.WriteLine("\nUsing StreamWriter / StreamReader");
Console.WriteLine("Read and wrote file: {0} with contents:\n{1}",
filename, contents);
// Clean up
File.Delete(filename);
}
void TextFilesAnotherWay()
{
string filename = "SimpleFileIO_hello.txt";
// Another way to read and write text files
// uses the File class's static methds to get a TextWriter / TextReader
// Writing -- use CreateText to get a TextWriter on a new text file
TextWriter tw = File.CreateText(filename);
tw.WriteLine("Hello world");
tw.Close();
// Use OpenText to get a TextReader
TextReader tr = File.OpenText(filename);
string contents = tr.ReadLine();
tr.Close();
// Prove it
Console.WriteLine("\nUsing TextWriter / TextReader");
Console.WriteLine("Read and wrote file: {0} with contents:\n{1}",
filename, contents);
// Clean up
File.Delete(filename);
}
void BinaryFiles()
{
// Write binary files using BinaryWriter / Binary Reader
string filename = "SimpleFileIO_binary.bin";
// Use BinaryWriter constructor on a file
BinaryWriter bw = new BinaryWriter(
File.Open(filename, FileMode.Create));
// Write some bytes (for example)
for (byte i = byte.MinValue; i < byte.MaxValue; i++)
{
bw.Write(i);
}
bw.Close();
// Read them back, with a simple test
BinaryReader br = new BinaryReader(
File.Open(filename, FileMode.Open));
bool readFailed = false;
for (byte i = byte.MinValue; i < byte.MaxValue ; i++)
{
if (br.ReadByte() != i)
readFailed = true;
}
br.Close();
// Prove it
Console.WriteLine("\nWrite and read of binay file {0}: {1}",
filename,
readFailed ? "failed" : "succeded");
// Clean up
File.Delete(filename);
}
}</pre>
Posted in Implementing serialization and input/output functionality in a .NET Framework application | Add a comment »