GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — EmailContacts/src/EmailContacts/info.cshtml at master · ServiceStackApps/EmailContacts Expand file tree/ Copy pathinfo.cshtmlMore file actions 64 lines (55 loc) · 1.82 KB / Copy pathinfo.cshtmlFile metadata and controls64 lines (55 loc) · 1.82 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 @using EmailContacts.ServiceInterface <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Email Contacts</title> <script type="text/javascript" src="Scripts/jquery-2.1.3.js"></script> <script type="text/javascript" src="Scripts/bootstrap.js"></script> <link href="Content/bootstrap.css" rel="stylesheet" /> <link href="Content/bootstrap-theme.css" rel="stylesheet" /> <style type="text/css"> body { margin: 20px; } </style> </head> <body> <h3>Db.Select</h3> <ul> @foreach (var contact in Db.Select<Contact>()) { <li>@contact.Name @contact.Email (@contact.Age)</li> } </ul> <h3>ResolveService / Get</h3> <ul> @using (var service = Get<ContactsServices>()) { var contacts = service.Any(new FindContacts()); foreach (var contact in contacts) { <li>@contact.Name @contact.Email (@contact.Age)</li> } } </ul> <h3>Embedded JSON</h3> <ul id="embedded-json"></ul> <h3>$.getJSON</h3> <ul id="ajax"></ul> <script> //Embed JSON $("#embedded-json").append( contactsHtml(@(Db.Select<Contact>().AsRawJson()))); //Ajax $.getJSON("/contacts", addContacts); function addContacts(contacts) { $("#ajax").append(contactsHtml(contacts)); } function contactsHtml(contacts) { return contacts.map(function (c) { return "<li>" + c.Name + " " + " (" + c.Age + ")" + "</li>"; }).join(''); } </script> </body> </html> |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |