annotate SilverlightValidation/SilverlightValidation.Web/index.html @ 57:558c09d76726

Web host added
author Steven Hollidge <stevenhollidge@hotmail.com>
date Thu, 19 Apr 2012 14:39:59 +0100
parents
children
rev   line source
57
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
2 <html xmlns="http://www.w3.org/1999/xhtml" >
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
3
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
4 <head>
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
5 <title>SilverlightValidation</title>
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
6 <style type="text/css">
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
7 html, body {
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
8 height: 100%;
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
9 overflow: auto;
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
10 }
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
11 body {
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
12 padding: 0;
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
13 margin: 0;
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
14 }
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
15 #silverlightControlHost {
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
16 height: 100%;
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
17 text-align:center;
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
18 }
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
19 </style>
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
20 <script type="text/javascript" src="Silverlight.js"></script>
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
21 <script type="text/javascript">
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
22 function onSilverlightError(sender, args) {
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
23 var appSource = "";
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
24 if (sender != null && sender != 0) {
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
25 appSource = sender.getHost().Source;
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
26 }
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
27
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
28 var errorType = args.ErrorType;
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
29 var iErrorCode = args.ErrorCode;
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
30
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
31 if (errorType == "ImageError" || errorType == "MediaError") {
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
32 return;
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
33 }
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
34
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
35 var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n" ;
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
36
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
37 errMsg += "Code: "+ iErrorCode + " \n";
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
38 errMsg += "Category: " + errorType + " \n";
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
39 errMsg += "Message: " + args.ErrorMessage + " \n";
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
40
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
41 if (errorType == "ParserError") {
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
42 errMsg += "File: " + args.xamlFile + " \n";
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
43 errMsg += "Line: " + args.lineNumber + " \n";
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
44 errMsg += "Position: " + args.charPosition + " \n";
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
45 }
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
46 else if (errorType == "RuntimeError") {
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
47 if (args.lineNumber != 0) {
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
48 errMsg += "Line: " + args.lineNumber + " \n";
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
49 errMsg += "Position: " + args.charPosition + " \n";
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
50 }
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
51 errMsg += "MethodName: " + args.methodName + " \n";
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
52 }
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
53
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
54 throw new Error(errMsg);
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
55 }
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
56 </script>
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
57 </head>
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
58 <body>
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
59 <form id="form1" runat="server" style="height:100%">
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
60 <div id="silverlightControlHost">
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
61 <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
62 <param name="source" value="ClientBin/SilverlightValidation.xap"/>
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
63 <param name="onError" value="onSilverlightError" />
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
64 <param name="background" value="white" />
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
65 <param name="minRuntimeVersion" value="5.0.61118.0" />
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
66 <param name="autoUpgrade" value="true" />
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
67 <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="text-decoration:none">
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
68 <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
69 </a>
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
70 </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
71 </form>
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
72 </body>
558c09d76726 Web host added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
73 </html>