<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Beth Massi - Sharing the goodness</title><link>http://blogs.msdn.com/b/bethmassi/</link><description>Community champion for business application developers</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Use Your MSDN Benefit to Convert Your Office 365 Developer Preview</title><link>http://blogs.msdn.com/b/bethmassi/archive/2013/05/20/use-your-msdn-benefit-to-convert-your-office-365-developer-preview.aspx</link><pubDate>Mon, 20 May 2013 20:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10420132</guid><dc:creator>Beth Massi</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10420132</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2013/05/20/use-your-msdn-benefit-to-convert-your-office-365-developer-preview.aspx#comments</comments><description>&lt;p&gt;The easiest way to get started &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2013/01/17/get-started-building-sharepoint-apps-in-minutes-with-lightswitch.aspx" target="_blank"&gt;developing SharePoint apps with LightSwitch&lt;/a&gt; is to &lt;a href="http://msdn.microsoft.com/en-US/library/office/apps/fp179924#o365_signup" target="_blank"&gt;sign up for a free trial of an Office 365 Developer account&lt;/a&gt; at dev.office.com. Because Office 365 has moved from preview to release, if you signed up for a preview account, you have until May 31st to convert it to a paid subscription. Doing so will save all your content.&lt;/p&gt;
&lt;p&gt;You can use your MSDN subscription benefit to get a year free. Here&amp;rsquo;s a step-by-step slideshare by Randall Isenhour (&lt;a href="https://twitter.com/SharePointDev" target="_blank"&gt;@SharePointDev&lt;/a&gt;) from the Office content team.&lt;/p&gt;
&lt;p&gt;&lt;iframe style="border-width: 1px 1px 0px; border-style: solid; border-color: #cccccc; margin-bottom: 5px;" src="http://www.slideshare.net/slideshow/embed_code/20671026" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="427" height="356"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;div style="margin-bottom: 5px;"&gt;&lt;strong&gt;&lt;a title="Convert Office 365 Developer Preview to paid subscription using MSDN benefit" href="http://www.slideshare.net/randalli1/convert-office365developerpreviewtopaidsubscriptionwithmsdn" target="_blank"&gt;Convert Office 365 Developer Preview to paid subscription using MSDN benefit&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href="http://www.slideshare.net/randalli1" target="_blank"&gt;Randall Isenhour&lt;/a&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;p&gt;I just converted mine and it took about 5 minutes.&lt;/p&gt;
&lt;p&gt;For more details see the Apps For Office and SharePoint Blog: &lt;br /&gt;&lt;em&gt;&lt;a href="http://blogs.msdn.com/b/officeapps/archive/2013/05/06/convert-your-office-365-developer-subscription-preview-to-a-general-availability-subscription-to-save-your-content.aspx" target="_blank"&gt;Convert your Office 365 Developer Subscription Preview to a General Availability subscription to save your content&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10420132" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Office365/">Office365</category></item><item><title>Saving Data Across One-to-One Relationships</title><link>http://blogs.msdn.com/b/bethmassi/archive/2013/05/09/saving-data-across-one-to-one-relationships.aspx</link><pubDate>Thu, 09 May 2013 20:59:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10417447</guid><dc:creator>Beth Massi</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10417447</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2013/05/09/saving-data-across-one-to-one-relationships.aspx#comments</comments><description>&lt;p&gt;I’ve had a couple questions recently on how you could add data to tables that have a one-to-zero-or-one relationship in Visual Studio LightSwitch. Depending on whether the related record is mandatory (required) or not you have a couple different options when inserting data. So in this post I’ll show you a couple different options for doing that in both the desktop and mobile clients. &lt;/p&gt;  &lt;h3&gt;Our Data Model&lt;/h3&gt;  &lt;p&gt;Let’s take a simple data model of Customer and a related table CustomerNote. A customer can have zero or one note as defined by the relationship. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3617.image_5F00_68B0B17A.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8081.image_5F00_thumb_5F00_0F1294C6.png" width="500" height="492" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When we create our Customer screens, LightSwitch will automatically bring the CustomerNote fields in as well. For edit screens this is exactly what we want because this allows the user to edit fields across both tables on one screen. However, on AddNew screens, LightSwitch will not automatically add a new record to the CustomerNote table – we need to write code for that depending on if the note is mandatory or not. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5355.image_5F00_43B2F101.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6428.image_5F00_thumb_5F00_7C5D9B0E.png" width="692" height="402" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Adding Code to the Silverlight Client&lt;/h3&gt;  &lt;p&gt;In order to support this in the Silverlight desktop client we need to write some VB (or C#) code. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Mandatory: Always add a related record&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you want to always add a related record, use the _Created event. Open the data designer to the parent record (in my case Customer), select the DesktopClient perspective and then write code in the &lt;em&gt;_Created &lt;/em&gt;event to add the related record every time the parent is inserted. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6332.image_5F00_62F597D4.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2605.image_5F00_thumb_5F00_26C9CC2C.png" width="687" height="526" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Write the code in &lt;strong&gt;bold.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;VB:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Public Class &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Customer
    &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Customer_Created()
&lt;strong&gt;        &lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CustomerNote = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;New &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;CustomerNote&lt;/span&gt;&lt;/strong&gt;&lt;span style="background: white; color: black;"&gt;&lt;strong&gt;()
&lt;/strong&gt;    &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;End Sub
End Class
&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;C#:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;public partial class &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Customer
&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;{
    &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;partial void &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Customer_Created()
    {
&lt;strong&gt;        &lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="background: white; color: blue;"&gt;this&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CustomerNote = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;new &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;CustomerNote&lt;/span&gt;&lt;/strong&gt;&lt;span style="background: white; color: black;"&gt;&lt;strong&gt;();
&lt;/strong&gt;    }
}&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Now when we run the desktop client and add a new customer, the note fields are enabled.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5355.image_5F00_0D61C8F2.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7506.image_5F00_thumb_5F00_4202252D.png" width="541" height="472" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Optional: Allow the user to decide&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the related record is optional and you want to have the user decide, add a gesture (like a button) to your screen. Open the screen designer and add a button, select “Write my own method” and call it AddNote, then edit the CanExecute and Execute methods. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6318.image_5F00_1AC7DBF8.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6320.image_5F00_thumb_5F00_0C896308.png" width="393" height="245" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;VB:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;AddNote_CanExecute(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ByRef &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;result &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As Boolean&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;)
    &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;'Only enable the button if there is no note
&lt;/span&gt;&lt;strong&gt;&lt;span style="background: white; color: black;"&gt;    result = (&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CustomerProperty.CustomerNote &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Is Nothing&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;)
&lt;/span&gt;&lt;/strong&gt;&lt;span style="background: white; color: blue;"&gt;End Sub

Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;AddNote_Execute()
&lt;/span&gt;&lt;span style="background: white; color: green;"&gt;    ' Add the note
&lt;strong&gt;    &lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CustomerProperty.CustomerNote = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;New &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;CustomerNote&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;()
&lt;/span&gt;&lt;/strong&gt;&lt;span style="background: white; color: blue;"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;C#:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;partial void &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;AddNote_CanExecute(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ref bool &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;result)
{
&lt;/span&gt;&lt;span style="background: white; color: green;"&gt;    // Only enable the button if there is no note
&lt;strong&gt;    &lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="background: white; color: black;"&gt;result = (&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;this&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CustomerProperty.CustomerNote == &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;null&lt;/span&gt;&lt;/strong&gt;&lt;span style="background: white; color: black;"&gt;&lt;strong&gt;);
&lt;/strong&gt;}

&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;partial void &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;AddNote_Execute()
{
&lt;/span&gt;&lt;span style="background: white; color: green;"&gt;    // Add the note
&lt;/span&gt;&lt;strong&gt;&lt;span style="background: white; color: blue;"&gt;    this&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CustomerProperty.CustomerNote = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;new &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;CustomerNote&lt;/span&gt;&lt;/strong&gt;&lt;span style="background: white; color: black;"&gt;&lt;strong&gt;();
&lt;/strong&gt;}
&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;Adding Code to the HTML Client&lt;/h3&gt;

&lt;p&gt;In order to support this in the html client we need to write some JavaScript code. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mandatory: Always add a related record&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open the data designer to the parent record, but this time select the &lt;strong&gt;HTMLClient perspective&lt;/strong&gt;. Then write JavaScript code in the &lt;em&gt;_Created &lt;/em&gt;event to add the related record every time the parent is inserted. &lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: black;"&gt;myapp.Customer.created = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(entity) {

    &lt;strong&gt;entity.CustomerNote = &lt;/strong&gt;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&lt;strong&gt;new &lt;/strong&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&lt;strong&gt;myapp.CustomerNote();
&lt;/strong&gt;};&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Notice the use of the &lt;em&gt;myapp &lt;/em&gt;object here. You can use the myapp object in a variety of ways in order to access data and screens in the HTML client. Check out some other uses here- &lt;em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/vstudio/jj733572.aspx"&gt;How to: Modify an HTML Screen by Using Code&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now when we run the HTML client and add a new customer, the note fields are enabled.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2703.image_5F00_6C022355.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6011.image_5F00_thumb_5F00_399E4FD6.png" width="398" height="522" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Optional: Allow the user to decide&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open the screen designer and add a button, select “Write my own method” and call it AddNote, then edit the CanExecute and Execute methods. Then write this code:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: black;"&gt;myapp.AddEditCustomer.AddNote_canExecute = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(screen) {
    &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;// enables the button (returns true) if the note doesn't exist
&lt;strong&gt;    &lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="background: white; color: blue;"&gt;return &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(screen.Customer.CustomerNote == &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;null&lt;/span&gt;&lt;/strong&gt;&lt;span style="background: white; color: black;"&gt;&lt;strong&gt;);
&lt;/strong&gt;
};
myapp.AddEditCustomer.AddNote_execute = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(screen) {
    &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;//Add a new note
&lt;strong&gt;    &lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="background: white; color: black;"&gt;screen.Customer.CustomerNote = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;new &lt;/span&gt;&lt;/strong&gt;&lt;span style="background: white; color: black;"&gt;&lt;strong&gt;myapp.CustomerNote();
&lt;/strong&gt;};&lt;/span&gt;&lt;/pre&gt;

&lt;h3&gt;Wrap Up&lt;/h3&gt;

&lt;p&gt;So those are a couple different ways you can manage data participating in one-to-zero-or-one relationships. Keep in mind that these tables are in the same data source, but they don’t have to be, &lt;a href="http://msdn.microsoft.com/en-us/library/vstudio/ff852044.aspx#Different" target="_blank"&gt;you can set up virtual relationships&lt;/a&gt; this way as well. If you do have separate data sources, however, you’ll also need to tell LightSwitch the order in which you want to update them. For more information on that see:&lt;em&gt; &lt;/em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/vstudio/jj733572.aspx#save"&gt;&lt;em&gt;Customize the Save command to save to multiple data sources&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10417447" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Data/">Data</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/HTML/">HTML</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/JavaScript/">JavaScript</category></item><item><title>LightSwitch Community &amp; Content Rollup–April 2013</title><link>http://blogs.msdn.com/b/bethmassi/archive/2013/05/01/lightswitch-community-amp-content-rollup-april-2013.aspx</link><pubDate>Wed, 01 May 2013 21:07:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10415491</guid><dc:creator>Beth Massi</dc:creator><slash:comments>10</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10415491</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2013/05/01/lightswitch-community-amp-content-rollup-april-2013.aspx#comments</comments><description>&lt;p&gt;&lt;em&gt;Last year I started posting a rollup of interesting community happenings, content, samples and extensions popping up around &lt;/em&gt;&lt;a href="http://msdn.com/lightswitch"&gt;&lt;em&gt;Visual Studio LightSwitch&lt;/em&gt;&lt;/a&gt;&lt;em&gt;. If you missed those rollups you can check them all out here: &lt;/em&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/tags/rollup/"&gt;&lt;em&gt;LightSwitch Community &amp;amp; Content Rollups&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/04/04/announcing-the-release-of-the-lightswitch-html-client.aspx" target="_blank"&gt;&lt;img title="image" style="border: 0px currentcolor; float: right; display: inline; background-image: none;" border="0" alt="image" align="right" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5226.image_5F00_3ED74D19.png" width="153" height="110" /&gt;&lt;/a&gt;This month was &lt;strong&gt;FULL OF AWESOMENESS&lt;/strong&gt; as we &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/04/04/announcing-the-release-of-the-lightswitch-html-client.aspx" target="_blank"&gt;finally released the 3rd version of LightSwitch&lt;/a&gt;! &lt;/p&gt;  &lt;p&gt;WE DID IT! WHOOOHOOO! You can now build HTML5 and JavaScript-based clients that are optimized for touch-oriented, modern mobile devices. LightSwitch also supports publishing your apps to SharePoint 2013 &amp;amp; Office 365, so you can also build SharePoint 2013 apps with LightSwitch. There’s been a TON of activity in the community this month (this is probably my biggest rollup to date) so read on…&lt;/p&gt;  &lt;h3&gt;LightSwitch HTML Client Released in Visual Studio 2012 Update 2!&lt;/h3&gt;  &lt;p&gt;It’s been an exciting, challenging journey and I congratulate the team on this important milestone of one of the most exciting products I have been fortunate to be a part of. Thank you to the community, the team, and my family for supporting me and LightSwitch for the last couple years!&lt;/p&gt;  &lt;p&gt;We’re seeing a lot of new faces in the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/lightswitch/threads" target="_blank"&gt;forums&lt;/a&gt;, &lt;a href="http://twitter.com/#!/VSLightSwitch" target="_blank"&gt;twitter&lt;/a&gt;, &lt;a href="http://www.facebook.com/vslightswitch" target="_blank"&gt;Facebook&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/lightswitch" target="_blank"&gt;our blog&lt;/a&gt;, email, etc. asking questions and congratulating us on this release. Our &lt;a href="http://msdn.com/lightswitch" target="_blank"&gt;Developer Center&lt;/a&gt; has almost &lt;strong&gt;doubled&lt;/strong&gt; in traffic! It’s very exciting (and sometimes overwhelming) to see the community growing – and I know we’re just getting started. &lt;/p&gt;  &lt;p&gt;Check out the LightSwitch HTML and SharePoint resources and get started building HTML5 business apps today!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.com/lightswitch/htmlclient"&gt;&lt;img border="0" alt="" align="left" src="http://i.msdn.microsoft.com/jj554319.DOWNLOAD_55(en-us,MSDN.10).jpg" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://msdn.com/lightswitch/htmlclient"&gt;LightSwitch in Visual Studio 2012 Update 2&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;LightSwitch Developer Center Freshness&lt;/h3&gt;  &lt;p&gt;We made a bunch of updates to the &lt;a href="http://msdn.com/lightswitch" target="_blank"&gt;LightSwitch Developer Center&lt;/a&gt; for this release so if you haven’t visited lately, I encourage you to do so. The Dev Center is your one-stop-shop for all the best LightSwitch resources, documentation and tutorials. &lt;strong&gt;Make sure to bookmark &lt;/strong&gt;&lt;a title="http://msdn.com/lightswitch" href="http://msdn.com/lightswitch"&gt;&lt;strong&gt;http://msdn.com/lightswitch&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; and check back often.&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.com/lightswitch"&gt;&lt;img title="image" style="margin: 6px 10px 0px 0px; border: 0px currentcolor; float: left; display: inline; background-image: none;" border="0" alt="image" align="left" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5810.image_5F00_3098D429.png" width="218" height="132" /&gt;&lt;/a&gt;Some of the goodies we’ve added are new &lt;a href="http://msdn.microsoft.com/en-us/vstudio/gg604823"&gt;“How Do I…?” videos &lt;/a&gt;that will help you get started with the new HTML client.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dn195504"&gt;How Do I: Get Started with the LightSwitch HTML Client?&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dn195505"&gt;How Do I: View Data in a List with the LightSwitch HTML Client?&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dn195506"&gt;How Do I: Add and Edit Data with the LightSwitch HTML Client?&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dn195507"&gt;How Do I: Create Master-Details Screens with the LightSwitch HTML Client?&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dn195508"&gt;How Do I: Filter Data on a Screen with the LightSwitch HTML Client?&lt;/a&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/gg491708" target="_blank"&gt;&lt;img title="image" style="margin: 10px 0px 0px 5px; border: 0px currentcolor; float: right; display: inline; background-image: none;" border="0" alt="image" align="right" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7776.image_5F00_374BDDAC.png" width="216" height="132" /&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;We also have a new architecture page that explains the application architecture and hosting options of a LightSwitch application, including the new HTML5 client and SharePoint 2013 support. See: &lt;a href="http://msdn.microsoft.com/en-us/vstudio/gg491708"&gt;Exploring LightSwitch Architecture&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We also updated our tutorials so if you haven’t checked them out lately I encourage you to do so. You can access them and get the download from the new &lt;a href="http://msdn.microsoft.com/en-US/vstudio/htmlclient"&gt;HTML client page&lt;/a&gt;. &lt;/p&gt;  &lt;h3&gt;JavaScript Samples for LightSwitch Developers&lt;/h3&gt;  &lt;p&gt;We also released the first set of JavaScript snippets that you will find useful in your LightSwitch apps. Then Michael Washington of the &lt;a href="http://lightswitchhelpwebsite.com/" target="_blank"&gt;LightSwitchHelpWebsite.com&lt;/a&gt; wrote up a “full color” companion article to got with it so check it out!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/189/Walk-thru-Examples-of-Common-Visual-Studio-LightSwitch-JavaScript.aspx" target="_blank"&gt;Walk-thru Examples of Common Visual Studio LightSwitch JavaScript&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;h3&gt;Sneak Peak: ComponentOne HTML Controls for LightSwitch!&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.componentone.com/" target="_blank"&gt;&lt;img title="image" style="margin: 0px 10px 10px 0px; border: 0px currentcolor; float: left; display: inline; background-image: none;" border="0" alt="image" align="left" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4645.image_5F00_28A131C7.png" width="129" height="111" /&gt;&lt;/a&gt;Michael Washington also posted a sneak peak at the coveted, soon to be released, &lt;a href="http://www.componentone.com/" target="_blank"&gt;ComponentOne&lt;/a&gt; controls for the LightSwitch HTML client! I can’t wait to get my hands on these! If they’re anything like their other world-class &lt;a href="http://www.componentone.com/SuperProducts/OLAPLightSwitch/" target="_blank"&gt;LightSwitch controls for Silverlight&lt;/a&gt;, then we’re really in for a treat with the HTML client controls. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/192/Sneak-Peek-Wijmo-Creates-Custom-JavaScript-In-LightSwitch-HTML-Client.aspx" target="_blank"&gt;Sneak Peek: Wijmo Creates Custom JavaScript In LightSwitch HTML Client&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Xpert360 LightSwitch Screencasts on Dynamics CRM &amp;amp; Salesforce Data&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://xpert360.com/" target="_blank"&gt;&lt;img style="float: left; display: inline;" alt="Xpert360 Ltd Software Solutions" align="left" src="http://xpert360.com/images/xpert360_web_header_200x60.png" width="127" longdesc="file:///C:/Users/bethma/AppData/Local/Temp/WindowsLiveWriter1286139640/Software%20Solutions" height="38" /&gt;&lt;/a&gt;&lt;a href="http://xpert360.com/" target="_blank"&gt;Xpert360&lt;/a&gt; released a couple great screencasts that show you how to build LightSwitch clients for your Dynamics CRM and Salesforce data without writing code. Check them out!&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=uoATiz9MSVg" target="_blank"&gt;Visual Studio LightSwitch - Dynamics CRM&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=XHU-CEel3Ec&amp;amp;feature=youtu.be" target="_blank"&gt;Visual Studio LightSwitch - HTML5 Dynamics CRM Contacts Browser&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=YRkLaByT3xg" target="_blank"&gt;Visual Studio LightSwitch – Salesforce&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Check out their &lt;a href="http://xpert360.com/products/lightning_products.aspx" target="_blank"&gt;free Lightning Adapters here&lt;/a&gt;. Thanks guys!&lt;/p&gt;  &lt;h3&gt;   &lt;br /&gt;New LightSwitch E-Book! &lt;/h3&gt;  &lt;p&gt;&lt;a href="https://twitter.com/progalex" target="_blank"&gt;Alessandro Del Sole&lt;/a&gt; has released another awesome book – check it out! &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.informit.com/store/hidden-visual-studio-lightswitch-secrets-from-the-real-9780672337352" target="_blank"&gt;Hidden Visual Studio LightSwitch: Secrets from the Real World for Creating Great Apps&lt;/a&gt;     &lt;br /&gt;&lt;em&gt;This eBook offers practical tips and tricks as well as useful guidance on how to implement common features in LightSwitch, such as those for working with documents, business analysis, screen customization, optimal server configuration, usage with databases other than SQL Server, and so on.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;  &lt;h3&gt;LightSwitch Events&lt;/h3&gt;  &lt;p&gt;We got a couple new events to add to the list from last month and more details on TechEd! Try and make one of these great events and come say “HI”. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://vslive.com/events/chicago-2013/home.aspx?utm_source=AttendeeMktg&amp;amp;utm_medium=Fax&amp;amp;utm_campaign=CHSPK26"&gt;&lt;strong&gt;VSLive! Chicago&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; May 13-16      &lt;br /&gt;&lt;/strong&gt;&lt;a href="https://twitter.com/ADefWebserver"&gt;Michael Washington&lt;/a&gt; of the famed &lt;a href="http://lightswitchhelpwebsite.com/"&gt;LightSwitchHelpWebsite.com&lt;/a&gt; is speaking in Chicago in May. &lt;a href="http://vslive.com/events/chicago-2013/sessions/session-list.aspx"&gt;Check out the sessions here&lt;/a&gt;. Also, don’t miss Michael’s interview here: &lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/184/The-Visual-Studio-Live-interview.aspx"&gt;The Visual Studio Live! interview&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.devteach.com/SpecialEvent.aspx" target="_blank"&gt;&lt;img style="margin: 5px 10px 5px 0px; float: left; display: inline;" border="0" vspace="5" align="left" src="http://www.devteach.com/SpecialEvent/VSLightSwitch.jpg" /&gt;&lt;/a&gt;&lt;a href="http://www.devteach.com/"&gt;&lt;strong&gt;DevTeach&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; Toronto May 25 – 31      &lt;br /&gt;&lt;/strong&gt;I have a couple LightSwitch sessions and &lt;a href="http://www.devteach.com/SpecialEvent.aspx"&gt;&lt;strong&gt;an all-day training on May 25th&lt;/strong&gt;&lt;/a&gt; at the 10-year anniversary of this awesome community run conference in Canada. I’ve been speaking here every year except the first, even before I joined Microsoft, so I’m honored to have been invited to this special event.&lt;a href="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013?sort=sequential&amp;amp;direction=desc&amp;amp;term=LightSwitch#fbid=SyiIjG0dmfE" target="_blank"&gt;&lt;img title="e0faac45-830a-45ab-b0ff-2ad3b55b2352[1]" style="margin: 5px 0px 5px 12px; border: 0px currentcolor; float: right; display: inline; background-image: none;" border="0" alt="e0faac45-830a-45ab-b0ff-2ad3b55b2352[1]" align="right" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6886.e0faac45_2D00_830a_2D00_45ab_2D00_b0ff_2D00_2ad3b55b23521_5F00_4445BDBD.png" width="155" height="116" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://northamerica.msteched.com/"&gt;&lt;strong&gt;TechEd North America&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; June 3 – 6 New Orleans, LA &amp;amp;      &lt;br /&gt;&lt;/strong&gt;&lt;a href="http://europe.msteched.com/"&gt;&lt;strong&gt;TechEd Europe&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; June 25-28 Madrid, Spain&amp;#160; &lt;br /&gt;&lt;/strong&gt;I’ll be speaking at TechEd in New Orleans and &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/tags/heinrich+wendel/" target="_blank"&gt;Heinrich&lt;/a&gt; will be speaking in Madrid this year. We’ve got a couple great &lt;a href="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013?sort=sequential&amp;amp;direction=desc&amp;amp;term=LightSwitch#fbid=SyiIjG0dmfE" target="_blank"&gt;LightSwitch sessions and Hands-on-Labs!&lt;/a&gt; Hope to see you there.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.falafel.com/falafel-con-2013"&gt;&lt;strong&gt;FalafelCon 2013&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; June 10th – 11th Microsoft Silicon Valley Campus, Mountain View, CA      &lt;br /&gt;&lt;/strong&gt;I’ll also be speaking at the conference put on by Falafel Software, Telerik &amp;amp; Microsoft. It’s here in my neck of the woods and it should be a great event with a lot of very well known speakers.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.buildwindows.com/"&gt;&lt;strong&gt;//build/&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; June 25 – 28 San Francisco, CA      &lt;br /&gt;&lt;/strong&gt;Details soon!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.thatconference.com/Sessions/session_731" target="_blank"&gt;&lt;strong&gt;That Conference&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; Wisconsin Dells, WI August 12th – 14th      &lt;br /&gt;&lt;/strong&gt;I’ll be talking about LightSwitch HTML goodness at this “summer camp for geeks”. It’ll be my first time at this event so I’m really looking forward to it!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Team Blogs In Your Face!&lt;/h3&gt;  &lt;p&gt;The team has really been cranking out the content on the &lt;a href="http://blogs.msdn.com/b/lightswitch/" target="_blank"&gt;LightSwitch Team blog&lt;/a&gt;. Our goal is to teach you the tips and tricks needed to build fantastic business apps. Check out these latest articles on a variety of topics. If you’re new to the LightSwitch HTML Client, I recommend starting with the “Signed-In” series that &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/tags/andy+kung/" target="_blank"&gt;Andy&lt;/a&gt; wrote up that shows you how to build a modern, touch-oriented sign in sheet application.&lt;/p&gt;  &lt;p&gt;HTML How-Tos&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/11/21/html-client-daily-deals-andy-kung.aspx"&gt;Building a LightSwitch HTML Client: eBay Daily Deals (Andy Kung)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/04/10/many-to-how-many-html-edition-heinrich-wendel.aspx"&gt;Many-To-How-Many - HTML Edition (Heinrich Wendel)&lt;/a&gt;&amp;#160;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2013/03/21/master-detail-screens-with-the-lightswitch-html-client.aspx"&gt;Master-Detail Screens with the LightSwitch HTML Client (Beth Massi)&lt;/a&gt;&lt;/li&gt; &lt;!--EndFragment--&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/18/signed-in-part-1-introduction-andy-kung.aspx"&gt;Signed-In Part 1 – Introduction (Andy Kung)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/19/signed-in-part-2-upcoming-events-screen-andy-kung.aspx"&gt;Signed-In Part 2 – Upcoming Events Screen (Andy Kung)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/21/signed-in-part-3-guest-list-screen-andy-kung.aspx"&gt;Signed-In Part 3 – Guest List Screen (Andy Kung)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/25/signed-in-part-4-authentication-and-branding-andy-kung.aspx"&gt;Signed-In Part 4 – Authentication and Branding (Andy Kung)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/26/signed-in-part-5-search-screen-and-dynamic-ui-andy-kung.aspx"&gt;Signed-In Part 5 – Search Screen and Dynamic UI (Andy Kung)&lt;/a&gt;&amp;#160;&amp;#160; &lt;!--EndFragment--&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;SharePoint apps&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/07/a-quick-amp-easy-lightswitch-app-for-sharepoint.aspx"&gt;A quick &amp;amp; easy LightSwitch app for SharePoint (Brian Moore)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/04/29/publishing-lightswitch-apps-for-sharepoint-to-the-catalog.aspx"&gt;Publishing LightSwitch apps for SharePoint to the Catalog (Brian Moore)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/04/02/sharepoint-hosting-options-for-lightswitch.aspx"&gt;SharePoint Hosting &amp;amp; Authentication Options for LightSwitch (Brian Moore)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/28/using-sharepoint-lists-as-lightswitch-entities-and-with-csom-chris-rummel.aspx"&gt;Using SharePoint Lists as LightSwitch Entities and with CSOM (Chris Rummel)&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;UX&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/05/a-new-user-experience.aspx"&gt;A New User Experience (Heinrich Wendel)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/12/designing-for-multiple-form-factors.aspx"&gt;Designing for Multiple Form Factors (Heinrich Wendel)&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Architecture &amp;amp; APIs&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/11/19/a-new-api-for-lightswitch-server-interaction-the-serverapplicationcontext.aspx"&gt;A New API for LightSwitch Server Interaction: The ServerApplicationContext (Joe Binder)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/11/13/new-lightswitch-html-client-apis.aspx"&gt;New LightSwitch HTML Client APIs (Stephen Provine)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/04/15/using-serverapplicationcontext.aspx"&gt;Using the LightSwitch ServerApplicationContext API (Matt Evans)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2013/04/17/using-lightswitch-serverapplicationcontext-and-webapi-to-get-user-permissions.aspx"&gt;Using LightSwitch ServerApplicationContext and WebAPI to Get User Permission (Beth Massi)&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;UI Customization&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/12/19/enhancing-lightswitch-controls-with-jquery-mobile-michael-zlatkovsky.aspx"&gt;Enhancing LightSwitch Controls with jQuery Mobile (Michael Zlatkovsky)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/12/06/custom-controls-and-data-binding-in-the-lightswitch-html-client-joe-binder.aspx"&gt;Custom Controls and Data Binding in the LightSwitch HTML Client (Joe Binder)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2013/04/24/adding-a-signature-control-to-the-lightswitch-html-client.aspx"&gt;Adding a Signature Control to the LightSwitch HTML Client (Beth Massi)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/01/14/visualizing-list-data-using-a-map-control-heinrich-wendel.aspx"&gt;Visualizing List Data using a Map Control (Heinrich Wendel)&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Reporting Dashboards&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/04/22/create-dashboard-reports-with-lightswitch-webapi-and-serverapplicationcontext.aspx"&gt;Create Dashboard Reports with LightSwitch, WebAPI and ServerApplicationContext (Steve Lasker)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/04/25/create-dashboard-reports-with-lightswitch-and-webapi-part-deux.aspx"&gt;Dashboard Reports with LightSwitch, WebAPI and ServerApplicationContext– Part Deux (Steve Lasker)&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For more, head to the &lt;a href="http://msdn.com/lightswitch" target="_blank"&gt;&lt;strong&gt;LightSwitch Developer Center&lt;/strong&gt;&lt;/a&gt;. &lt;/p&gt;  &lt;h3&gt;More Notable Content this Month&lt;/h3&gt;  &lt;p&gt;&lt;strong&gt;Extensions released this month (&lt;/strong&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/site/search?f%5B0%5D.Type=SearchText&amp;amp;f%5B0%5D.Value=LightSwitch&amp;amp;sortBy=Date"&gt;see over 100 of them here!&lt;/a&gt;&lt;strong&gt;): &lt;/strong&gt;Xpert360 is releasing themes like crazy! Check out these new ones. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/a71c889b-6e57-492a-abbc-f7d381a93d57" target="_blank"&gt;Xpert360 Lightning - Office Theme Pack&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/7a5b3804-26cc-4994-af1b-d5117298038d" target="_blank"&gt;Xpert360 Lightning - Mint Choc Chip Theme&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/3a9a5c87-1c8f-441f-9b48-1e4b0788ac37" target="_blank"&gt;Xpert360 Lightning - Chocolate Theme Pack&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/fef134c5-78c3-4ab2-a273-c2a087d0b6fd" target="_blank"&gt;Xpert360 Lightning - Spring Flowers Theme [V2,V3,SL]&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Samples (&lt;/strong&gt;&lt;a href="http://code.msdn.microsoft.com/vstudio/site/search?f%5B0%5D.Type=SearchText&amp;amp;f%5B0%5D.Value=LightSwitch&amp;amp;sortBy=Date"&gt;see over 100 of them here&lt;/a&gt;!&lt;strong&gt;): &lt;/strong&gt;Lots of samples this month!&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/vstudio/Adding-a-Signature-Control-958234e9" target="_blank"&gt;Adding a Signature Control to the LightSwitch HTML Client&lt;/a&gt;&amp;#160;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/vstudio/Lightswitch-AmazingPie-6b4665c6" target="_blank"&gt;LightSwitch AmazingPie Sample Database&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/vstudio/The-LightSwitch-Contoso-7e1081e0" target="_blank"&gt;The LightSwitch Contoso Moving App in C#&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/vstudio/LightSwitch-HTML-Picture-821a2bbe" target="_blank"&gt;LightSwitch HTML Picture Manager Using WCF RIA Services&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/vstudio/Using-the-LightSwitch-ea14f61e" target="_blank"&gt;Using LightSwitch ServerApplicationContext and WebAPI to Get User Permissions&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Presentations: &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Check out &lt;a href="http://www.sadev.co.za/users/rmaclean" target="_blank"&gt;Robert MacLean’s&lt;/a&gt; LightSwitch presentation he did at TechEd Africa:     &lt;br /&gt;&lt;a href="http://www.sadev.co.za/content/teched-africa-2013-whats-new-lightswitch-2013" target="_blank"&gt;TechEd Africa 2013: What's new in LightSwitch 2013?&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Community Articles:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Holy blog posts, Batman! &lt;a href="http://blog.pragmaswitch.com" target="_blank"&gt;Paul van Bladel&lt;/a&gt; – you’re on fire this month with 12 posts! &lt;a href="http://www.thepoweroflightswitch.com/" target="_blank"&gt;Chris Finlan&lt;/a&gt;, you win for the longest article titles I’ve ever seen. ;) Also -- welcome to our new blogger &lt;a href="http://mattirelandmx.wordpress.com/author/mattirelandmx/"&gt;Matt Ireland!&lt;/a&gt; Kudos to all that provided content this month. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.thepoweroflightswitch.com/2013/04/using-sap-netweaver-gateway-sql-azure-and-lightswitch-to-create-actionable-bi-apps.html"&gt;Action Jackson or Using SAP Netweaver Gateway, SQL Azure and LightSwitch to create “actionable BI” Apps for Sharepoint on Office 365, an end-to-end walkthrough, part deux minus one&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=895"&gt;Activating multi selection with checkboxes in a LightSwitch grid with a one-liner&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=949"&gt;Avoiding magic strings in LightSwitch (part 1)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=915"&gt;Avoiding magic strings in LightSwitch (part 2): Getting strongly typed access to the LightSwitch choice lists&lt;/a&gt;&lt;!--EndFragment--&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/185/Computed-Properties-With-the-LightSwitch-HTML-Client.aspx"&gt;Computed Properties With the LightSwitch HTML Client&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=912"&gt;Decently protecting entity fields which may be only updated by server side processing.&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/188/Deleting-Data-In-The-Visual-Studio-LightSwitch-HTML-Client.aspx"&gt;Deleting Data In The Visual Studio LightSwitch HTML Client&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=1116"&gt;Flexible CSV exports over web-api with server side MEF. (part 1)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://mattirelandmx.wordpress.com/2013/04/18/html-editor-in-lightswitch/"&gt;HTML Editor in Lightswitch&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/187/LightSwitch-HTML-Picture-Manager-Using-WCF-RIA-Services.aspx"&gt;LightSwitch HTML Picture Manager Using WCF RIA Services&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://mattirelandmx.wordpress.com/2013/04/12/rolodex-index-style-filter-for-lightswitch/"&gt;Rolodex index style filter for Lightswitch&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/186/Server-Side-Search-using-the-LightSwitch-HTML-Client.aspx"&gt;Server Side Search using the LightSwitch HTML Client&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=961"&gt;State driven security (part1) in LightSwitch&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=1045"&gt;State driven security in LightSwitch (part2): the big picture&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=1046"&gt;State driven security in LightSwitch (part 3): server side state transition security&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=1050"&gt;State driven security in LightSwitch (part 4): client side state transition convenience.&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=1068"&gt;State driven security in LightSwitch (part 5): let the state dictate what you can update&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=1131"&gt;State driven security in LightSwitch (part 6): client side CanUpdate handling&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.thepoweroflightswitch.com/2013/04/the-van-der-haegen-conundrum.html"&gt;The Van der Haegen Conundrum or Using Power View, LightSwitch and oData to make yourself look smarter than you really are (Part 1 of Part 3 of the – oh, never mind)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=905"&gt;Validation warnings with an on screen confirmation box&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://mattirelandmx.wordpress.com/2013/04/16/wrapping-tabs/"&gt;Wrapping Tabs&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Did I miss any good articles? Drop me a comment below!&lt;/p&gt;  &lt;h3&gt;LightSwitch Team Community Sites&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.facebook.com/vslightswitch"&gt;&lt;img style="margin: 0px 10px 0px 0px;" border="0" alt="" align="left" src="http://badge.facebook.com/badge/151211271561073.1904.953280091.png" /&gt;&lt;/a&gt; Become a fan of &lt;a href="http://www.facebook.com/vslightswitch"&gt;Visual Studio LightSwitch on Facebook&lt;/a&gt;. Have fun and interact with us on our wall. Check out the cool stories and resources. Here are some other places you can find the LightSwitch team:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/lightswitch/threads"&gt;LightSwitch MSDN Forums&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://msdn.com/lightswitch"&gt;LightSwitch Developer Center&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://blogs.msdn.com/lightswitch"&gt;LightSwitch Team Blog&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://twitter.com/#!/VSLightSwitch"&gt;LightSwitch on Twitter&lt;/a&gt; (@VSLightSwitch, #VS2012 #LightSwitch)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Final Personal Note&lt;/h3&gt;  &lt;p&gt;Personally it’s been an amazing month – the most amazing in my life actually. Not just because of the LightSwitch release but also because I got engaged to the most wonderful man in the world. Nick, I love you! Here’s to many amazing years together.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1581.WP_5F00_20130430_5F00_004_5F00_6F1E21CF.jpg"&gt;&lt;img title="WP_20130430_004" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="WP_20130430_004" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6864.WP_5F00_20130430_5F00_004_5F00_thumb_5F00_07418C2B.jpg" width="318" height="179" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10415491" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Rollup/">Rollup</category></item><item><title>Adding a Signature Control to the LightSwitch HTML Client</title><link>http://blogs.msdn.com/b/bethmassi/archive/2013/04/24/adding-a-signature-control-to-the-lightswitch-html-client.aspx</link><pubDate>Wed, 24 Apr 2013 15:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10413529</guid><dc:creator>Beth Massi</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10413529</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2013/04/24/adding-a-signature-control-to-the-lightswitch-html-client.aspx#comments</comments><description>&lt;p&gt;LightSwitch is all about building business solutions quickly -- defining your data models &amp;amp; business rules and visually creating screens with a set of built-in controls. It does all the boring plumbing so you can concentrate on the real value of your applications. But LightSwitch also allows for all sorts of customizations so you don’t hit that infamous “glass ceiling”. When the team set out to build the LightSwitch HTML client, they wanted to make sure that the extensibility model was super simple and in line with the way web developers build solutions today. &lt;/p&gt;  &lt;p&gt;With the Silverlight client, extension authors have to know about the guts of the LightSwitch extensibility model in order to provide easy-to-use extensions consumable by LightSwitch developers. There are over 100 (and growing) &lt;a href="http://visualstudiogallery.msdn.microsoft.com/site/search?query=LightSwitch&amp;amp;f%5B0%5D.Value=LightSwitch&amp;amp;f%5B0%5D.Type=SearchText&amp;amp;ac=8" target="_blank"&gt;LightSwitch extensions on the Visual Studio Gallery&lt;/a&gt; (even a &lt;a href="http://visualstudiogallery.msdn.microsoft.com/e8112e34-24ce-4a62-8985-5d34d450b180" target="_blank"&gt;signature control&lt;/a&gt;). But with the HTML client we wanted to take advantage of the huge web ecosystem already out there, so adding customizations can be as easy as finding the JavaScript library you want and wiring it up to your app.&amp;#160; &lt;/p&gt;  &lt;p&gt;The team has written a variety of articles on incorporating custom controls and data binding in LightSwitch. Here are a few:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/01/14/visualizing-list-data-using-a-map-control-heinrich-wendel.aspx"&gt;Visualizing List Data using a Map Control (Heinrich Wendel)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/12/19/enhancing-lightswitch-controls-with-jquery-mobile-michael-zlatkovsky.aspx"&gt;Enhancing LightSwitch Controls with jQuery Mobile (Michael Zlatkovsky)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/12/06/custom-controls-and-data-binding-in-the-lightswitch-html-client-joe-binder.aspx"&gt;Custom Controls and Data Binding in the LightSwitch HTML Client (Joe Binder)&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;In particular, the last one from Joe helped me immensely. Among other things, it describes the two hooks you get for UI customization in the HTML client -- the &lt;strong&gt;render&lt;/strong&gt; and &lt;strong&gt;postRender &lt;/strong&gt;events. If you need to modify DOM elements (i.e. controls) created by LightSwitch, use the &lt;em&gt;postRender&lt;/em&gt; event. This allows you to augment the element like adding a CSS class or other DOM attributes. However, if you need to completely take over the rendering yourself then you do this in the &lt;em&gt;render&lt;/em&gt; event of a LightSwitch custom control element. &lt;/p&gt;  &lt;p&gt;LightSwitch produces &lt;a href="http://en.wikipedia.org/wiki/Single-page_application" target="_blank"&gt;single-page applications (SPAs)&lt;/a&gt; based on &lt;a href="http://jquerymobile.com/"&gt;jQuery &lt;/a&gt;and &lt;a href="http://jquerymobile.com/" target="_blank"&gt;jQueryMobile&lt;/a&gt; so there are a plethora of plugins available for you to use in LightSwitch. Which ones you use totally depends on what you want to provide to your users and the devices that you need to support. In this post I want to show you a quick way of incorporating a signature control based on the &lt;a href="http://willowsystems.github.io/jSignature/#/about/" target="_blank"&gt;jSignature plugin&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/Adding-a-Signature-Control-958234e9" target="_blank"&gt;&lt;strong&gt;You can download the full source code for my example here.&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Add the Library to your LightSwitch Project&lt;/h3&gt;  &lt;p&gt;The first step is to grab the control you want. Search the web, look in a catalog, ask a friend, browse NuGet right from within Visual Studio, or (heaven forbid) write one yourself! With any custom code you bring into your application you’ll want to make sure it works for you. &lt;a href="http://willowsystems.github.io/jSignature/#/demo/" target="_blank"&gt;jSignature has a live demo&lt;/a&gt;, so you can test that it works on the devices you want to support before doing anything. This particular library says it works well on many devices, has a nice import/export feature, and good documentation, so that’s why I picked this one for this example. &lt;/p&gt;  &lt;p&gt;Once you &lt;a href="http://willowsystems.github.io/jSignature/jSignature.zip" target="_blank"&gt;download jSignature&lt;/a&gt;, extract the ZIP. With your LightSwitch project open, flip to File View in Solution Explorer and drag the jSignature.min.js library into your Scripts folder under your HTML client project. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6253.image_5F00_1C7AA9F8.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8132.image_5F00_thumb_5F00_1C0E7703.png" width="631" height="576" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next open the default.htm and add the script reference:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5001.image_5F00_3BBD50CB.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7142.image_5F00_thumb_5F00_14830796.png" width="643" height="208" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now you’re ready to use the signature control in your LightSwitch app. &lt;/p&gt;  &lt;h3&gt;Add the Custom Control&lt;/h3&gt;  &lt;p&gt;For this example I’ve created a simple data model for tracking work orders. Once an employee completes a work order, they need to sign it. There are many ways to store the jSignature data in LightSwitch. jSignature has a variety of formats it supports so have a look at the &lt;a href="http://willowsystems.github.io/jSignature/#/about/" target="_blank"&gt;documentation&lt;/a&gt;. For this example I’ll show how to store it as an Image using the Image Business Type as well as storing it in a much more compressed base30 string that can be reloaded back into the jSignature control. &lt;/p&gt;  &lt;p&gt;So our data model looks like this. Note the two fields we’ll be using for our custom signature controls, SignatureImage and SignatureVector. I made SignatureVector of length 2000 to be on the safe side, but I’d imagine most signatures wouldn’t need that much space.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3513.image_5F00_6D48BE60.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6558.image_5F00_thumb_5F00_217CE7A7.png" width="714" height="292" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next we’ll add a couple Add/Edit Details screens that work with these fields. Add a new screen and select Add/Edit Details and for the Screen Data select the WorkOrder. First one name “SignWorkOrderImage” and then add another one called “SignWorkOrderVector”&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0218.image_5F00_5A2791B4.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8306.image_5F00_thumb_5F00_79D66B7C.png" width="712" height="509" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now in the Screen Designer make the content tree how you like. For the SignWorkOrderImage screen I am going to place the SignatureImage on the screen twice, but one of them will be our custom control. There’s a few ways you can add custom controls to screens. If your control isn’t specific to a particular field, at the top of the Screen Designer click “Add Layout Item”, select “Custom Control”, and then you can specify the “screen” as the binding path.&lt;/p&gt;  &lt;p&gt;However, since our binding path will be the SignatureImage field, just select the content item in the tree and change it to a “Custom Control”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5657.image_5F00_4B7CE5CF.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5670.image_5F00_thumb_5F00_445DA957.png" width="172" height="74" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next set the height and width of both the Signature controls to “Fit to Content”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7536.image_5F00_001D420B.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2330.image_5F00_thumb_5F00_3FE72890.png" width="297" height="299" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I’ll also set the display name of the custom control to something a little more prominent “SIGN HERE:”. So for the SignWorkOrderImage screen the content tree looks like this.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1856.image_5F00_7FB10F15.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6560.image_5F00_thumb_5F00_3F7AF59B.png" width="293" height="174" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Similarly, for the SignWorkOrderVector screen, we’ll be working with the SignatureVector field. For testing, I’d like to actually see what the vector data is so I’ll also add a textbox to display that under the custom control. So the content tree for this screen looks like this.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6644.image_5F00_6A5359AD.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0880.image_5F00_thumb_5F00_2A1D4033.png" width="298" height="174" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next we need to write some code in the custom control’s &lt;em&gt;render &lt;/em&gt;events.&lt;/p&gt;  &lt;h3&gt;Working with Signatures as Images&lt;/h3&gt;  &lt;p&gt;Every control library will be different so you’ll need to learn the capabilities of the control itself before you can write code to render it. But once you’ve worked through the demo it’s pretty easy to figure out this particular control. &lt;/p&gt;  &lt;p&gt;The only thing that you need to keep in mind regards to LightSwitch is that the DOM we see inside our _render method is not the “live” DOM—it’s the DOM that exists before jQueryMobile expands it. Because of this, we need to wait until the DOM is fully rendered so that we can initialize the control and hook up the change notifications. &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/12/06/custom-controls-and-data-binding-in-the-lightswitch-html-client-joe-binder.aspx" target="_blank"&gt;Joe taught us how to do this&lt;/a&gt; using the setTimeout() function. &lt;/p&gt;  &lt;p&gt;What gets passed to us is the DOM element (element) and the data item we’re working with (contentItem). First create the control by specifying a &amp;lt;DIV&amp;gt; with an ID of “signature” and add that to the DOM. Then inside the setTimeout function we can initialize the control and then hook up the change listener. In order to get the data as an image from the jSignature control, we call getData and pass in the type we want back. The method returns an array with the type and the actual image data (ex. &lt;strong&gt;img[1]&lt;/strong&gt; ). &lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="background: white; color: black;"&gt;myapp.SignWorkOrderImage.Signature_render = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(element, contentItem) {

    &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;//Create the control &amp;amp; attach to the DOM
    &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;sig = $(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;&amp;lt;div id='signature'&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;);
    sig.appendTo($(element));

&lt;/span&gt;&lt;span style="background: white; color: green;"&gt;    &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;setTimeout(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;() {
&lt;span style="background: white; color: black;"&gt;        &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;//Initialize and start capturing
&lt;/span&gt;        sig.jSignature();

        &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;// Listen for changes made via the custom control and update the 
        // content item whenever it changes.  
        &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;sig.bind(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;change&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(e) {
            &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;img = sig.jSignature(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;getData&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;);
            &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;if &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(img != &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;null&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;) {
                &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;if &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(contentItem.value != img[1]) {
                    contentItem.value = img[1];
                }
            }
        });
    }, 0);    
};&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;We can also add a button to the screen to clear the signature – just specify this code in the button’s execute method.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: black;"&gt;myapp.SignWorkOrderImage.ClearSignature_execute = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(screen) {
    &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;// Write code here.
    &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;$(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;#signature&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;).jSignature(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;reset&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;);
};&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;So when we run this screen we will see the signature control and as we perform each stroke, our image control is updated. If we save this, it will save as an image to the database. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6131.image_5F00_69E726B8.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3414.image_5F00_thumb_5F00_37835339.png" width="596" height="554" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;Working with Signatures as Vectors&lt;/h3&gt;

&lt;p&gt;Saving the image directly to the database is quick and handy but the jSignature control documentation warns that it’s not supported on older versions of Android. Also the images won’t scale particularly well. So it’s probably better to store the data as vector data or something that can be re-rendered later. Like I mentioned before, there are a lot of formats you can choose from, even SVG and Base64 formats. Instead of storing the data as an Image business type in LightSwitch, change it to a standard Binary and you’re good to go.&lt;/p&gt;

&lt;p&gt;But since the base30 format that jSignature provides is the most compact, we’ll use that for the next example. This format also allows us to load it into the jSignature control when we open the screen as well. &lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: black;"&gt;myapp.SignWorkOrderVector.Signature_render = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(element, contentItem) {

    &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;//Create the control &amp;amp; attach to the DOM
    &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;sig = $(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;&amp;lt;div id='signature' &amp;gt;&amp;lt;/div&amp;gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;);
    sig.appendTo($(element));

    &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;setTimeout(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;() {
&lt;span style="background: white; color: green;"&gt;        //Initialize control and set initial data       
    &lt;/span&gt;    sig.jSignature();
        &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;if &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(contentItem.value != &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;null&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;) {
            sig.jSignature(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;setData&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;data:&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;+ contentItem.value);
        }

        &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;// Listen for changes made via the custom control and update the  
        // content item whenever it changes.  
        &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;sig.bind(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;change&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(e) {
            &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;data = sig.jSignature(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;getData&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;base30&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;);
            &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;if &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(data != &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;null&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;) {
                data = data.join(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;);
                &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;if &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(contentItem.value != data) {
                    contentItem.value = data;
                }
            }
        });
    }, 0);   
};&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;When we run this screen you can see the much smaller payload for the signature. We also see the control loaded with data when we reopen it.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8787.image_5F00_702DFD46.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4064.image_5F00_thumb_5F00_3DCA29C7.png" width="670" height="599" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;Wrap Up&lt;/h3&gt;

&lt;p&gt;That’s it! As you can see, adding UI customizations takes just a little knowledge of JavaScript and understanding of how LightSwitch renders the DOM. In fact, I’m learning JavaScript &amp;amp; jQuery through LightSwitch and I think I have just enough knowledge to be &lt;strike&gt;dangerous &lt;/strike&gt;productive now :-) &lt;/p&gt;

&lt;p&gt;Keep in mind that not all devices support all the controls out there so your mileage may vary. But I hope I demonstrated how you can easily customize the LightSwitch HTML client.&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10413529" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/HTML/">HTML</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/JavaScript/">JavaScript</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Custom+Controls/">Custom Controls</category></item><item><title>Using LightSwitch ServerApplicationContext and WebAPI to Get User Permissions</title><link>http://blogs.msdn.com/b/bethmassi/archive/2013/04/17/using-lightswitch-serverapplicationcontext-and-webapi-to-get-user-permissions.aspx</link><pubDate>Wed, 17 Apr 2013 19:36:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10412011</guid><dc:creator>Beth Massi</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10412011</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2013/04/17/using-lightswitch-serverapplicationcontext-and-webapi-to-get-user-permissions.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2013/04/12/lightswitch-tip-a-way-to-check-user-permissions-from-the-html-client.aspx" target="_blank"&gt;Last post&lt;/a&gt; I showed a simple way of checking a single user permission from an HTML client screen in order to disable/enable UI elements. If you only have a couple permissions to check and you don’t want to write a lot of code then this simple tip works. However, if you need to check many permissions throughout your HTML client app or you need to return permissions to custom web clients you build against the LightSwitch server, a better idea is to retrieve all these permissions at once for the logged in user and store them on the client so all screens can access them without hitting the database again. &lt;/p&gt;  &lt;p&gt;The LightSwitch philosophy is to provide RAD tools for building business apps fast, but still allow advanced customization where and when you need it. In this post I’ll show you a way to return user permissions by creating a custom web method using &lt;a href="http://www.asp.net/web-api" target="_blank"&gt;Web API&lt;/a&gt; and the LightSwitch ServerApplicationContext that was introduced in Visual Studio 2012 Update 2. If you missed Matt’s post about it, check it out here: &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/04/15/using-serverapplicationcontext.aspx"&gt;&lt;em&gt;Using the LightSwitch ServerApplicationContext API &lt;/em&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/Using-the-LightSwitch-ea14f61e" target="_blank"&gt;&lt;strong&gt;You can download the sample code from this post here.&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Create Permissions and Secure your Data&lt;/h3&gt;  &lt;p&gt;The first step in securing your data based on user permissions is to define your permissions and check them from the entity access control methods. For this example, we will define a couple permissions “CanAddCustomer” and “CanEditCustomer” that determines whether a user can perform Inserts and Edits on a Customer entity on the server. &lt;/p&gt;  &lt;p&gt;Open the Project Properties and define your permissions. Make sure to enable authentication. Then check off the permissions you want to enable while you’re debugging. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3247.image_5F00_thumb1_5F00_14C31FC8.png"&gt;&lt;img title="image_thumb[1]" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image_thumb[1]" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2063.image_5F00_thumb1_5F00_thumb_5F00_18613AA5.png" width="714" height="328" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Then in the data designer, select the Server perspective and then drop down the “Write Code” button and select the Customers_CanInsert and Customers_CanUpdate access control methods:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1526.image_5F00_307D9CCA.png"&gt;&lt;img title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4338.image_5F00_thumb_5F00_502C7692.png" width="709" height="515" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Then you write code like this to allow or disallow the insertion and editing of customers:&lt;/p&gt;  &lt;p&gt;VB:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Customers_CanInsert(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ByRef &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;result &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As Boolean&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;)
    result = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Application.User.HasPermission(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CanAddCustomer)
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;End Sub

Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Customers_CanUpdate(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ByRef &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;result &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As Boolean&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;)
    result = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Application.User.HasPermission(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CanEditCustomer)
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;C#:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;partial void &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Customers_CanInsert(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ref bool &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;result)
{
    result = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;this&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Application.User.HasPermission(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CanAddCustomer);
}

&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;partial void &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Customers_CanUpdate(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ref bool &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;result)
{
    result = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;this&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Application.User.HasPermission(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CanEditCustomer);
}&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;You &lt;strong&gt;always &lt;/strong&gt;want to secure the server-side this way in order to protect the data in your system. However, sometimes we also want to use a permission check in the UI in order to hide/unhide (or enable/disable) elements on a multitude of screens. &lt;/p&gt;

&lt;p&gt;As I mentioned in my previous post, the Silverlight desktop client exposes a User object available to you at all times from any screen, so checking permissions on the client is easy. Here’s how you can create a similar object for the HTML client that holds all the permissions for a logged in user.&lt;/p&gt;

&lt;h3&gt;Create a Custom Web API on the LightSwitch Server&lt;/h3&gt;

&lt;p&gt;First we’re going to use Web API to expose a RESTful service that will return JSON to the client. Flip to the file view in the Solution Explorer. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2148.image_5F00_thumb4_5F00_17F507B0.png"&gt;&lt;img title="image_thumb[4]" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image_thumb[4]" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4237.image_5F00_thumb4_5F00_thumb_5F00_57BEEE35.png" width="261" height="102" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add a folder called “Perms” (or whatever you want to call it) to the Server project , add an new item, and select &lt;strong&gt;Web API Controller Class &lt;/strong&gt;and name it “UserPermissionsController”.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8831.image_5F00_thumb3_5F00_1788D4BB.png"&gt;&lt;img title="image_thumb[3]" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image_thumb[3]" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3632.image_5F00_thumb3_5F00_thumb_5F00_16B06ED1.png" width="702" height="485" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we can use the LightSwitch ServerApplicationContext to verify the user is authenticated and to create a dictionary of their own permissions. If the user is not authenticated then nothing is returned. Note that you will need to add references to the LightSwitch Server and Security namespaces first. &lt;/p&gt;

&lt;p&gt;In order to query the LightSwitch SecurityData where the permission data resides we need to temporarily elevate the caller’s permissions. This elevation is only in effect during the extent of the execution of the method. For more information about permission elevation see: &lt;em&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2011/04/07/how-to-elevate-permissions-in-server-code-ravi-eda.aspx" target="_blank"&gt;How to Elevate Permissions in Server Code&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Be careful what you put in this dictionary. Here we are simply populating a list of permissions, we’re not putting any sensitive information in there like the user’s name or passwords. Remember with power comes responsibility.&lt;/p&gt;

&lt;p&gt;VB:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Imports &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;System.Net
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Imports &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;System.Web.Http
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Imports &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;LightSwitchApplication
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Imports &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Microsoft.LightSwitch.Server
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Imports &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Microsoft.LightSwitch.Security

&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Public Class &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;UserPermissionsController
    &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Inherits &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;ApiController

    &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;' GET api/&amp;lt;controller&amp;gt;
    &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Public Function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;GetValues() &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Dictionary&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Of String&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Boolean&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;)
        &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;'This will generically retrieve all the permissions of the current logged in user. 

        &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Dim &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;perms &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As New &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Dictionary&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Of String&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Boolean&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;)

        &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;ctx &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;ServerApplicationContext &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;= &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;ServerApplicationContext&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CreateContext()
            &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Dim &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;currentUser = ctx.Application.User

            &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;'If the requestor is not logged in then nothing is returned. 
            ' Only properly logged in users can retrieve their own permissions
            &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;If &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;currentUser.IsAuthenticated &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Then

                &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;perms.Add(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.SecurityAdministration,
                          currentUser.HasPermission(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.SecurityAdministration))

                &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;'elevate permissions temporarily
                &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;currentUser.AddPermissions(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.SecurityAdministration)

                &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;For Each &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;perm &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permission &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;In &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;ctx.DataWorkspace.SecurityData.Permissions()
                    &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;If &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;perm.Id &amp;lt;&amp;gt; &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.SecurityAdministration &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Then

                        &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;perms.Add(perm.Id, currentUser.HasPermission(perm.Id))
                    &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;End If
                Next
            End If
        End Using

        Return &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;perms
    &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;End Function

End Class&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;C#:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;System;
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;System.Collections.Generic;
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;System.Linq;
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;System.Net;
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;System.Net.Http;
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;System.Web.Http;
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Microsoft.LightSwitch.Server;
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Microsoft.LightSwitch.Security;
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Microsoft.LightSwitch.Security.Server;
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;LightSwitchApplication;

&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;namespace &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;LightSwitchApplication.Perms
{
    &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;public class &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;UserPermissionsController &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;: &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;ApiController
    &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;{
        &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;// GET api/&amp;lt;controller&amp;gt;
        &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;public &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Dictionary&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;string&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Boolean&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;gt; Get()
        {
            &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Dictionary&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;string&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Boolean&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;gt; perms = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;new &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Dictionary&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;string&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Boolean&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;gt;();

            &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;ServerApplicationContext &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;ctx = &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;ServerApplicationContext&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CreateContext())
            {
                &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;var &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;currentUser = ctx.Application.User;
                &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;if &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(currentUser.IsAuthenticated)
                {
                    perms.Add(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.SecurityAdministration,
                        currentUser.HasPermission(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.SecurityAdministration));

                    currentUser.AddPermissions(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.SecurityAdministration);

                    &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;foreach &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permission &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;perm &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;in &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;ctx.DataWorkspace.SecurityData.Permissions)
                    {
                        &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;if &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(perm.Id != &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.SecurityAdministration)
                        {
                            perms.Add(perm.Id, currentUser.HasPermission(perm.Id));
                        }
                    }
                }
            }
            &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;return &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;perms;
        }
    }
}&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Finally we need to add a route to our controller. Right-click on the server project again and add a Global Application Class (Global.asax) and add the following references at the top:&lt;/p&gt;

&lt;p&gt;VB:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Imports &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;System.Web.Http
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Imports &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;System.Web.Routing&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;C#:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;System.Web.Routing;
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;using &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;System.Web.Http; &lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Then in the Application_Start method add the route. &lt;/p&gt;

&lt;p&gt;VB:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Application_Start(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ByVal &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;sender &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As Object&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ByVal &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;e &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;EventArgs&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;)
&lt;/span&gt;&lt;span style="background: white; color: green;"&gt;    ' Fires when the application is started
&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;    RouteTable&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Routes.MapHttpRoute(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;PermsApi&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;Perms/{controller}&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;)
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;C#:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;protected void &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Application_Start(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;object &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;sender, &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;EventArgs &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;e)
{
&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;    RouteTable&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Routes.MapHttpRoute(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;PermsApi&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;Perms/{controller}&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;);
}&lt;/span&gt;&lt;/pre&gt;

&lt;h3&gt;Retrieve the Permissions on the Client&lt;/h3&gt;

&lt;p&gt;Next we need to call this method from the client and save the data in a global object. On the LightSwitch HTML client there is a global object called &lt;strong&gt;myapp &lt;/strong&gt;that we can use to store the permissions object. You can use the myapp object in a variety of ways in order to access data and screens in the HTML client. Check out some other uses here- &lt;em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/vstudio/jj733572.aspx" target="_blank"&gt;How to: Modify an HTML Screen by Using Code&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The handiest place to put the code to retrieve the permissions is in the &lt;strong&gt;created&lt;/strong&gt; method on the first screen in our application. This is the first user method that will be called when the app starts and we can be sure that the LightSwitch client environment is ready. &lt;/p&gt;

&lt;p&gt;Open the screen that is set as your Home screen (this is probably the first screen you created or you can right-click on a screen in the Solution Explorer and “Set as Home Screen”). Select the Screen node at the top of the content tree, drop down the “Write Code” button, and select the created method. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4722.image_5F00_6DBE5191.png"&gt;&lt;img title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5315.image_5F00_thumb_5F00_74715B14.png" width="649" height="219" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here’s the code that will call the web API and return a JSON object with the permissions. &lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: black;"&gt;myapp.BrowseCustomers.created = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(screen) {
    &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;// Write code here.
    &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;$.getJSON(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;../Perms/UserPermissions/&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(data) {

        &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;//attach the permissions to the global 'myapp' object 
        //so it is accessible to the client anywhere.
        &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;myapp.permissions = data;
     });    
};&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Put a breakpoint here and notice that the dictionary of permissions is returned when you run it.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0511.image_5F00_thumb5_5F00_5203D48F.png"&gt;&lt;img title="image_thumb[5]" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image_thumb[5]" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6470.image_5F00_thumb5_5F00_thumb_5F00_2AC98B5A.png" width="646" height="215" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;/em&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;Check the Permissions in JavaScript Code&lt;/h3&gt;

&lt;p&gt;Now that we have the set of permissions on the client we can check permissions anywhere in our HTML screens by writing some simple JavaScript. In my example I want to enable/disable buttons on a screen depending on whether the user can add or edit Customers. &lt;/p&gt;

&lt;p&gt;First take note of the control names you want to manipulate. In my case I have a couple buttons one named AddCustomer and another named EditCustomer.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5807.image_5F00_thumb6_5F00_038F4225.png"&gt;&lt;img title="image_thumb[6]" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image_thumb[6]" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3644.image_5F00_thumb6_5F00_thumb_5F00_71467B62.png" width="374" height="186" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just like before, select the Screen node at the top of the content tree, drop down the “Write Code” button, and select the created method for that screen. Then write code to check the permissions object:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;if &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(myapp.permissions[&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;LightSwitchApplication:CanAddCustomer&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;]) {
    screen.findContentItem(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;AddCustomer&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;).isEnabled = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;true&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;;
}
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;else &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;{
    screen.findContentItem(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;AddCustomer&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;).isEnabled = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;false&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;;
}
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;if &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(myapp.permissions[&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;LightSwitchApplication:CanEditCustomer&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;]) {
    screen.findContentItem(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;EditCustomer&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;).isEnabled = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;true&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;;
}
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;else &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;{
    screen.findContentItem(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;EditCustomer&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;).isEnabled = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;false&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;;
}&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Now we can see that buttons are correctly enabled &amp;amp; disabled based on the permissions. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4237.image_5F00_thumb8_5F00_4A0C322D.png"&gt;&lt;img title="image_thumb[8]" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image_thumb[8]" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7457.image_5F00_thumb8_5F00_thumb_5F00_50BF3BB0.png" width="515" height="518" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Wrap Up&lt;/h3&gt;

&lt;p&gt;LightSwitch is all about productivity and we strive to provide the best developer experience for building business apps as fast as possible. However we also want to allow advanced customization and power where and when you need it. Whether that’s implementing custom controls, data sources, web services, etc.&amp;#160; -- there is a lot of room for extensibility, especially in the latest version (V3) of &lt;a href="http://msdn.com/lightswitch/htmlclient" target="_blank"&gt;LightSwitch in Visual Studio 2012 Update 2&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;There are a lot of possibilities that are available to you now that we’ve opened up the LightSwitch API on the server using the ServerApplicationContext. Coupled with the ease of using Web API you can provide custom service interfaces to your LightSwitch server logic to provide smart, custom, RESTful HTTP services to a host of clients. &lt;/p&gt;

&lt;p&gt;With this practical example, I hope I not only showed you how to retrieve user permissions but also gave you a glimpse of what is possible. Stay tuned to the &lt;a href="http://blogs.msdn.com/b/lightswitch/" target="_blank"&gt;LightSwitch Team blog&lt;/a&gt; for more examples like dashboards and reporting scenarios. &lt;/p&gt;

&lt;p&gt;Enjoy! &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10412011" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/HTML/">HTML</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/JavaScript/">JavaScript</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/WebAPI/">WebAPI</category></item><item><title>LightSwitch Tip: A Simple Way to Check User Permissions from the HTML Client</title><link>http://blogs.msdn.com/b/bethmassi/archive/2013/04/12/lightswitch-tip-a-way-to-check-user-permissions-from-the-html-client.aspx</link><pubDate>Fri, 12 Apr 2013 15:36:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10410659</guid><dc:creator>Beth Massi</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10410659</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2013/04/12/lightswitch-tip-a-way-to-check-user-permissions-from-the-html-client.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;UPDATE 4/17: &lt;/strong&gt;If you’re not afraid to write some code, here’s a more robust way to get all the user permissions with one database call into the HTML client and use via JavaScript on any screen: &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2013/04/17/using-lightswitch-serverapplicationcontext-and-webapi-to-get-user-permissions.aspx"&gt;&lt;strong&gt;Using LightSwitch ServerApplicationContext and WebAPI to Get User Permissions&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;----------------&lt;/p&gt;  &lt;p&gt;Those of you that have been working with LightSwitch know that &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/08/15/beginning-lightswitch-in-vs-2012-part-5-may-i-controlling-access-with-user-permissions.aspx" target="_blank"&gt;we support a robust permissions system&lt;/a&gt; that allows developers to define certain permissions and then check them in code. LightSwitch provides numerous “CanExecute” hooks on entities and queries that can be used for checking permissions around data &amp;amp; query actions. &lt;/p&gt;  &lt;p&gt;For instance, if you have defined a permission “CanAddCustomer” you can check if a user has this permission before allowing Inserts on the Customer entity on the server. First define the permissions on the Access Control tab of the project properties:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7065.image_5F00_4A51D2F9.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0647.image_5F00_thumb_5F00_30E9CFBF.png" width="703" height="273" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Then in the data designer, select the Server perspective and then drop down the “Write Code” button and select the Customers_CanInsert access control method:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1526.image_5F00_307D9CCA.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4338.image_5F00_thumb_5F00_502C7692.png" width="709" height="515" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Then you write code like this to allow or disallow the insertion of customers:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Customers_CanInsert(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ByRef &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;result &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As Boolean&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;)
    result = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Application.User.HasPermission(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CanAddCustomer)
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;You &lt;strong&gt;always &lt;/strong&gt;want to secure the server-side this way in order to protect the data in your system. However, sometimes we also want to use a permission check in the UI in order to hide/unhide (or enable/disable) elements on a screen. &lt;/p&gt;

&lt;p&gt;In the Silverlight desktop client this is a very easy thing to do because we make use of portable assemblies that allows LightSwitch to share code between the client and the server side. You have a User object available to you at all times from any screen. In the HTML client this isn’t the case but all is not lost! &lt;/p&gt;

&lt;h3&gt;Define a Query&lt;/h3&gt;

&lt;p&gt;If we want to check permissions on the HTML client screens, the easiest thing to do is add a query and secure the query on the server-side. For example, add a query based on Customer called CanAddCustomer:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5822.image_5F00_21D2F0E5.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7571.image_5F00_thumb_5F00_2885FA68.png" width="732" height="207" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Then add the code in the CanAddCustomer_CanExecute method to check the permission:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;CanAddCustomer_CanExecute(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ByRef &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;result &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As Boolean&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;)
    result = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Application.User.HasPermission(&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Permissions&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.CanAddCustomer)
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Because this will hit the database if a user does have permission, we can make the query as efficient as possible by not returning any actual results. Select the CanAddCustomer_PreprocessQuery method and write a query that won’t return results. &lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;CanAddCustomer_PreprocessQuery(
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;            ByRef &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;query &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;System.Linq.&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;IQueryable&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Of &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;LightSwitchApplication.&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Customer&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;))

    query = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;From &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;c &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;In &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;query &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Where &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;0 = 1

&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;

&lt;h3&gt;Set Up the Screen&lt;/h3&gt;

&lt;p&gt;Now that we have our query we can add it to the screen in which we want to enable/disable UI elements based on this permission. On the screen designer click the “Add Data Item” button at the top and add the query to your screen:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8551.image_5F00_334351BD.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6404.image_5F00_thumb_5F00_00DF7E3E.png" width="716" height="634" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then select the control you want to enable/disable and note its name in the properties window, we’ll need this in code.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2768.image_5F00_475C6E46.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2671.image_5F00_thumb_5F00_670B480E.png" width="561" height="380" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Add Some JavaScript Code&lt;/h3&gt;

&lt;p&gt;Lastly, select the Screen node in the designer and then drop down the “Write Code” button and add code to the “created” method.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4722.image_5F00_6DBE5191.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5315.image_5F00_thumb_5F00_74715B14.png" width="649" height="219" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: black;"&gt;myapp.BrowseCustomers.created = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(screen) {
    &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;// Write code here.
    &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;screen.getCanAddCustomer().then(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;success() {
        screen.findContentItem(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;AddCustomer&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;).isEnabled = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;true&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;;
    }, &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;function &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;error() {
        screen.findContentItem(&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;&amp;quot;AddCustomer&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;).isEnabled = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;false&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;;
    });

};&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;The code calls the query on our screen and it will fail if the user doesn’t have permission to execute it, which will invoke the failure handler. Note that this could also hide the UI if the query failed for another reason, but this ensures the UI is only shown if the client can actually verify the user’s permissions.&lt;/p&gt;

&lt;p&gt;Remember that hiding the elements in the client doesn't provide real security, so make sure to use the server-side access control methods shown above to ensure no client can access data you want to protect.&amp;#160; &lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10410659" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Screens/">Screens</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/HTML/">HTML</category></item><item><title>LightSwitch All Day Training at DevTeach, Toronto in May</title><link>http://blogs.msdn.com/b/bethmassi/archive/2013/04/09/lightswitch-all-day-training-at-devteach-toronto-in-may.aspx</link><pubDate>Tue, 09 Apr 2013 18:57:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10409742</guid><dc:creator>Beth Massi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10409742</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2013/04/09/lightswitch-all-day-training-at-devteach-toronto-in-may.aspx#comments</comments><description>&lt;p&gt;Just announced! I’ll be delivering an all-day training at &lt;a href="http://www.devteach.com/" target="_blank"&gt;DevTeach&lt;/a&gt; again – this time in Toronto on May 25th! This was a huge success when I did it in Montreal so I’m happy to do this again. This time though, I have a lot of new content related to the &lt;a href="http://msdn.microsoft.com/en-US/vstudio/htmlclient" target="_blank"&gt;release of the HTML client and SharePoint 2013 support in Visual Studio 2012 Update 2&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Here are the details:&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.devteach.com/SpecialEvent.aspx" target="_blank"&gt;Mastering LightSwitch in Visual Studio 2012&lt;/a&gt; &lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.devteach.com/SpecialEvent.aspx" target="_blank"&gt;&lt;img style="margin: 5px 0px;" border="0" vspace="5" align="right" src="http://www.devteach.com/SpecialEvent/VSLightSwitch.jpg" /&gt;&lt;/a&gt;LightSwitch in Visual Studio 2012 is the easiest way to create modern line of business applications for the enterprise. In this training you will learn how to build connected business applications that can be deployed to Windows Azure or Office 365 and run on the desktop as well as modern mobile devices. We’ll start with the basics of building the middle-tier services and data entry screens with simple validations and then we’ll move into more advanced scenarios like writing complex business rules and processes. You’ll gain a full understanding of the architecture of a LightSwitch application and how it embraces best practices in n-tier design while handling all of the plumbing code for you. Learn how to integrate multiple data sources like SharePoint and OData services, as well as data validation, authentication, and access control. See how to access the LightSwitch data services from other clients and platforms and how to extend the middle-tier with your own services using WebAPI. You’ll learn the ins-and-outs of the data and screen designers to maximize your productivity as well as how to build LightSwitch SharePoint 2013 apps. You’ll also see how to create HTML5\JavaScript clients that can run on any modern mobile device as well as advanced customization techniques to provide customized UI’s &amp;amp; dashboards for mobile users. &lt;/p&gt;  &lt;p&gt;Learn more about &lt;a href="http://msdn.com/lightswitch"&gt;LightSwitch on the Developer Center&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Full day workshop for only $25.00&lt;/p&gt;  &lt;p&gt;Date: Saturday May 25th, 2013   &lt;br /&gt;Location: Delta Meadowvale (6750 Mississauga Road , Toronto, ON) &lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.devteach.com/SpecialEvent.aspx" target="_blank"&gt;&lt;font style="font-weight: bold;"&gt;Click here for more details &amp;amp; to register!&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;Hope to see you there!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10409742" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Speaking/">Speaking</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category></item><item><title>LightSwitch HTML Client &amp; SharePoint Resources–Get Started Building HTML5 Business Apps Today!</title><link>http://blogs.msdn.com/b/bethmassi/archive/2013/04/04/lightswitch-html-client-amp-sharepoint-resources-get-started-building-html5-business-apps-today.aspx</link><pubDate>Thu, 04 Apr 2013 22:46:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10407772</guid><dc:creator>Beth Massi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10407772</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2013/04/04/lightswitch-html-client-amp-sharepoint-resources-get-started-building-html5-business-apps-today.aspx#comments</comments><description>&lt;p&gt;This morning we &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/04/04/announcing-the-release-of-the-lightswitch-html-client.aspx" target="_blank"&gt;&lt;strong&gt;released the LightSwitch HTML client&lt;/strong&gt;&lt;/a&gt; in Visual Studio 2012 Update 2! I can’t tell you how excited I am to see this released to the public. It’s been an exciting, challenging journey and I congratulate the team on this important milestone of one of the most exciting products I have been fortunate to be a part of. Thank you to the community, the team, and my family for supporting me and LightSwitch for the last couple years!&lt;/p&gt;  &lt;table&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://msdn.com/lightswitch/htmlclient" target="_blank"&gt;&lt;img border="0" alt="" align="left" src="http://i.msdn.microsoft.com/jj554319.DOWNLOAD_55(en-us,MSDN.10).jpg" valign="center" /&gt;&lt;/a&gt;&lt;/td&gt;        &lt;td width="100%"&gt;         &lt;h3&gt;&lt;a href="http://msdn.com/lightswitch/htmlclient" target="_blank" valign="center"&gt;LightSwitch in Visual Studio 2012 Update 2&lt;/a&gt;&lt;/h3&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;(Note: if you are upgrading from Update 2 CTP4 then you can go ahead and install the final Update 2 release. Users of the LightSwitch Preview 2 please read these &lt;a href="http://go.microsoft.com/fwlink/?LinkID=285990&amp;amp;clcid=0x409" target="_blank"&gt;important upgrade instructions&lt;/a&gt;.) &lt;/p&gt;  &lt;p&gt;With the release of &lt;a href="http://msdn.microsoft.com/en-US/vstudio/htmlclient" target="_blank"&gt;LightSwitch in Visual Studio 2012 Update 2&lt;/a&gt;, we’ve also released a bunch of updated and new resources for you to check out on the &lt;a href="http://msdn.com/lightswitch/" target="_blank"&gt;&lt;strong&gt;LightSwitch Developer Center&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; &lt;/p&gt;  &lt;h3&gt;New “How Do I” Videos!&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/gg604823" target="_blank"&gt;&lt;img title="image" style="border: 0px currentcolor; float: left; display: inline; background-image: none;" border="0" alt="image" align="left" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6180.image_5F00_2F5564F4.png" width="157" height="181" /&gt;&lt;/a&gt;Yes that’s right folks! We’ve got a new &lt;a href="http://msdn.microsoft.com/en-us/vstudio/gg604823" target="_blank"&gt;“How Do I…?” video series&lt;/a&gt; that will help you get started with the new HTML client! (Yes, that’s my voice so get used to it! ;-))&lt;/p&gt;  &lt;p&gt;I’ve got 5 live now and stay tuned for more in the coming weeks!&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dn195504"&gt;How Do I: Get Started with the LightSwitch HTML Client?&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dn195505"&gt;How Do I: View Data in a List with the LightSwitch HTML Client?&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dn195506"&gt;How Do I: Add and Edit Data with the LightSwitch HTML Client?&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dn195507"&gt;How Do I: Create Master-Details Screens with the LightSwitch HTML Client?&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dn195508"&gt;How Do I: Filter Data on a Screen with the LightSwitch HTML Client?&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Updated Tutorials&lt;/h3&gt;  &lt;p&gt;We also overhauled our tutorials so if you haven’t checked them out lately I encourage you to do so. You can access them and get the download from the new &lt;a href="http://msdn.microsoft.com/en-US/vstudio/htmlclient" target="_blank"&gt;HTML client page&lt;/a&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=269541&amp;amp;clcid=0x409"&gt;LightSwitch HTML Client Tutorial&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=269542&amp;amp;clcid=0x409"&gt;LightSwitch SharePoint Tutorial &lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Explore LightSwitch Architecture &amp;amp; Hosting Options&lt;/h3&gt;  &lt;p&gt;&lt;img title="image" style="margin: 0px 10px 0px 0px; border: 0px currentcolor; float: left; display: inline; background-image: none;" border="0" alt="image" align="left" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4011.image_5F00_081B1BBF.png" width="154" height="98" /&gt;We also updated our architecture page. Go deeper and learn about the architecture of a LightSwitch application, including the new HTML5 client and SharePoint 2013     &lt;br /&gt;support!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/gg491708" target="_blank"&gt;Exploring LightSwitch Architecture&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;JavaScript Samples for LightSwitch Developers&lt;/h3&gt;  &lt;p&gt;We also released the first set of JavaScript snippets that you will find useful in your LightSwitch apps. Check out the sample and stay tuned for more! &lt;/p&gt;  &lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/JavaScript-for-LightSwitch-f1ec057c"&gt;LightSwitch JavaScript Coding Examples&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Use the &lt;a href="http://code.msdn.microsoft.com/JavaScript-for-LightSwitch-f1ec057c/view/Discussions#content" target="_blank"&gt;Q &amp;amp; A link on the sample&lt;/a&gt; to provide suggestions for additional code samples that you would like to see.&lt;/p&gt;  &lt;h3&gt;Lot’s more on the LightSwitch Team Blog!&lt;/h3&gt;  &lt;p&gt;The team has been releasing a TON of great content on the &lt;a href="http://blogs.msdn.com/b/lightswitch/" target="_blank"&gt;LightSwitch Team Blog&lt;/a&gt; so check it out! If you’re new to the LightSwitch HTML Client, I recommend starting with this series that shows you how to build a modern, touch-oriented sign in sheet application: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/18/signed-in-part-1-introduction-andy-kung.aspx"&gt;Signed-In Part 1 – Introduction&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/19/signed-in-part-2-upcoming-events-screen-andy-kung.aspx"&gt;Signed-In Part 2 – Upcoming Events Screen&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/21/signed-in-part-3-guest-list-screen-andy-kung.aspx"&gt;Signed-In Part 3 – Guest List Screen&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/25/signed-in-part-4-authentication-and-branding-andy-kung.aspx"&gt;Signed-In Part 4 – Authentication and Branding&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/26/signed-in-part-5-search-screen-and-dynamic-ui-andy-kung.aspx"&gt;Signed-In Part 5 – Search Screen and Dynamic UI&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I also recommend these awesome articles to learn more:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/12/designing-for-multiple-form-factors.aspx"&gt;Designing for Multiple Form Factors (Heinrich Wendel)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/07/a-quick-amp-easy-lightswitch-app-for-sharepoint.aspx"&gt;A quick &amp;amp; easy LightSwitch app for SharePoint (Brian Moore)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/11/13/new-lightswitch-html-client-apis.aspx"&gt;New LightSwitch HTML Client APIs (Stephen Provine)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/11/19/a-new-api-for-lightswitch-server-interaction-the-serverapplicationcontext.aspx"&gt;A New API for LightSwitch Server Interaction: The ServerApplicationContext (Joe Binder)&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;More LightSwitch Team Community Sites&lt;/h3&gt;  &lt;p&gt;Also check out our &lt;a href="http://facebook.com/vslightswitch" target="_blank"&gt;Facebook page&lt;/a&gt; for more fun stuff! And please ask your questions in the &lt;a href="http://social.msdn.microsoft.com/forums/en-US/lightswitch/threads" target="_blank"&gt;LightSwitch forum&lt;/a&gt;, the team is there to help!&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10407772" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Videos/">Videos</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/SharePoint/">SharePoint</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Samples/">Samples</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/HTML/">HTML</category></item><item><title>LightSwitch Community &amp; Content Rollup–March 2013</title><link>http://blogs.msdn.com/b/bethmassi/archive/2013/04/02/lightswitch-community-amp-content-rollup-march-2013.aspx</link><pubDate>Tue, 02 Apr 2013 18:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10407016</guid><dc:creator>Beth Massi</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10407016</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2013/04/02/lightswitch-community-amp-content-rollup-march-2013.aspx#comments</comments><description>&lt;p&gt;Last year I started posting a rollup of interesting community happenings, content, samples and extensions popping up around &lt;a href="http://msdn.com/lightswitch"&gt;Visual Studio LightSwitch&lt;/a&gt;. If you missed those rollups you can check them all out here: &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/tags/rollup/"&gt;LightSwitch Community &amp;amp; Content Rollups&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;LightSwitch in Visual Studio 2012 Update 2&lt;/h3&gt;
&lt;p&gt;March was an exciting month for us as we &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/04/announcing-a-new-preview-of-the-lightswitch-html-client.aspx" target="_blank"&gt;released the last HTML Client&lt;/a&gt; preview in &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2013/03/04/getting-started-with-lightswitch-in-visual-studio-2012-update-2-ctp4.aspx" target="_blank"&gt;Visual Studio Update 2 CTP4&lt;/a&gt;! The new HTML5 and JavaScript-based client addresses the increasing need to build touch-oriented business applications that run well on modern mobile devices. The preview also supports publishing these apps to SharePoint 2013 &amp;amp; Office 365, so you can also build SharePoint 2013 apps with LightSwitch. To give it a try see:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2013/03/04/getting-started-with-lightswitch-in-visual-studio-2012-update-2-ctp4.aspx" target="_blank"&gt;&lt;img src="http://i.msdn.microsoft.com/jj554319.DOWNLOAD_55(en-us,MSDN.10).jpg" alt="" align="left" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2013/03/04/getting-started-with-lightswitch-in-visual-studio-2012-update-2-ctp4.aspx" target="_blank"&gt;Getting Started with LightSwitch in Visual Studio 2012 Update 2&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Updated Tutorials&lt;/h3&gt;
&lt;p&gt;With the latest release we also overhauled our two tutorials that give you a good introduction to developing with the HTML client as well as working with SharePoint 2013. If you haven&amp;rsquo;t checked these out recently I encourage you to do so.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=269541&amp;amp;clcid=0x409"&gt;LightSwitch HTML Client Tutorial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=269542&amp;amp;clcid=0x409"&gt;LightSwitch SharePoint Tutorial &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&amp;ldquo;Step-By-Step&amp;rdquo; with Andy Kung&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/tags/Andy+Kung/" target="_blank"&gt;Andy&lt;/a&gt; is one of our most popular team writers and he&amp;rsquo;s put together another GREAT series of articles walking you through building a mobile app with LightSwitch. The app is a clipboard-style app that let&amp;rsquo;s people sign-in for events and is a good introduction for anyone learning LightSwitch and the HTML client. Check out his &amp;ldquo;Signed-In&amp;rdquo; series:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/18/signed-in-part-1-introduction-andy-kung.aspx" target="_blank"&gt;Signed-In Part 1 &amp;ndash; Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/19/signed-in-part-2-upcoming-events-screen-andy-kung.aspx" target="_blank"&gt;Signed-In Part 2 &amp;ndash; Upcoming Events Screen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/21/signed-in-part-3-guest-list-screen-andy-kung.aspx" target="_blank"&gt;Signed-In Part 3 &amp;ndash; Guest List Screen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/25/signed-in-part-4-authentication-and-branding-andy-kung.aspx" target="_blank"&gt;Signed-In Part 4 &amp;ndash; Authentication and Branding&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/26/signed-in-part-5-search-screen-and-dynamic-ui-andy-kung.aspx" target="_blank"&gt;Signed-In Part 5 &amp;ndash; Search Screen and Dynamic UI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Festive Themes from Xpert360&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5001.image_5F00_00B48AC2.png"&gt;&lt;img style="margin: 0px 0px 0px 5px; border: 0px currentcolor; float: right; display: inline; background-image: none;" title="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5516.image_5F00_thumb_5F00_06FB6150.png" alt="image" width="255" height="149" align="right" border="0" /&gt;&lt;/a&gt;On the western calendar, March had a couple holidays this year &amp;ndash; St. Patrick&amp;rsquo;s day and Easter &amp;ndash; and with that, &lt;a href="http://www.xpert360.com/" target="_blank"&gt;Xpert360&lt;/a&gt; created a few FREE festive themes based on the Cosmopolitan shell. Awesome! Thanks guys!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/271db55f-b534-46ea-ad3e-7c79f3cd8795" target="_blank"&gt;Xpert360Lightning - Easter Chick Theme&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/a1fc53c4-a86b-442a-a568-45e3576ef12a" target="_blank"&gt;Xpert360Lightning - Easter Theme&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/241153c9-5b35-4592-897d-7077301d5864" target="_blank"&gt;Xpert360Lightning - Shamrock Theme&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Syncfusion Raffle&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://janvanderhaegen.files.wordpress.com/2013/03/image-036.png" target="_blank"&gt;&lt;img style="margin: 0px 10px 0px 0px; float: left; display: inline;" src="http://janvanderhaegen.files.wordpress.com/2013/03/image-036.png" alt="" width="119" height="75" align="left" /&gt;&lt;/a&gt;In April, Syncfusion will be giving away &lt;strong&gt;five Enterprise &lt;a href="http://www.syncfusion.com/products"&gt;Syncfusion Essential Studio licenses&lt;/a&gt; worth $1999 each!&lt;/strong&gt; Check out the end of Jan van der Haegen&amp;rsquo;s blog post for details:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://janvanderhaegen.wordpress.com/2013/03/29/lightswitch-and-syncfusion-simply-beautiful-applications/" target="_blank"&gt;#LightSwitch and #Syncfusion: simply beautiful applications ($10.000 April raffle!)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Events&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2451.image_5F00_068F2E5B.png"&gt;&lt;img style="margin: 0px 12px 0px 0px; border: 0px currentcolor; float: left; display: inline; background-image: none;" title="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2364.image_5F00_thumb_5F00_713178F2.png" alt="image" width="118" height="89" align="left" border="0" /&gt;&lt;/a&gt;Earlier this month I spoke at TechDays in the Netherlands and got to meet a couple of my favorite LightSwitch rock stars, &lt;a href="http://janvanderhaegen.wordpress.com/"&gt;Jan van der Haegen&lt;/a&gt; and &lt;a href="http://blog.pragmaswitch.com/"&gt;Paul van Bladel&lt;/a&gt;. If you missed my trip report check it out:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2013/03/14/trip-report-techdays-netherlands-2013.aspx"&gt;&lt;strong&gt;Trip Report: TechDays Netherlands 2013&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We also have a bunch more events coming up. Check it out:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://vslive.com/events/chicago-2013/home.aspx?utm_source=AttendeeMktg&amp;amp;utm_medium=Fax&amp;amp;utm_campaign=CHSPK26"&gt;&lt;strong&gt;VSLive! Chicago&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; May 13-16 &lt;br /&gt;&lt;/strong&gt;&lt;a href="https://twitter.com/ADefWebserver"&gt;Michael Washington&lt;/a&gt; of the famed &lt;a href="http://lightswitchhelpwebsite.com/"&gt;LightSwitchHelpWebsite.com&lt;/a&gt; spoke at VSLive! in Las Vegas last week and is also speaking in Chicago in May. &lt;a href="http://vslive.com/events/chicago-2013/sessions/session-list.aspx" target="_blank"&gt;Check out the sessions here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.devteach.com/" target="_blank"&gt;&lt;strong&gt;DevTeach&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; Toronto May 27 &amp;ndash; 31 &lt;br /&gt;&lt;/strong&gt;I have a couple LightSwitch sessions and &lt;a href="http://www.devteach.com/SpecialEvent.aspx" target="_blank"&gt;an all-day training&lt;/a&gt; at the 10-year anniversary of this awesome community run conference in Canada. I&amp;rsquo;ve been speaking here every year except the first, even before I joined Microsoft, so I&amp;rsquo;m honored to have been invited to this special event.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://northamerica.msteched.com/"&gt;&lt;strong&gt;TechEd North America&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; June 3 &amp;ndash; 6 New Orleans, LA &amp;amp; &lt;/strong&gt;&lt;a href="http://europe.msteched.com/" target="_blank"&gt;&lt;strong&gt;TechEd Europe&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; June 25-28 Madrid, Spain&amp;nbsp; &lt;br /&gt;&lt;/strong&gt;Session details haven&amp;rsquo;t been announced yet but you can be sure that we&amp;rsquo;ll have a LightSwitch presence at TechEd again this year.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.falafel.com/falafel-con-2013"&gt;&lt;strong&gt;FalafelCon 2013&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; June 10th &amp;ndash; 11th Microsoft Silicon Valley Campus, Mountain View, CA &lt;br /&gt;&lt;/strong&gt;I&amp;rsquo;ll also be speaking at the conference put on by Falafel Software, Telerik &amp;amp; Microsoft. It&amp;rsquo;s here in my neck of the woods and it should be a great event with a lot of very well known speakers.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.buildwindows.com/" target="_blank"&gt;&lt;strong&gt;//build/&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; June 25 &amp;ndash; 28 San Francisco, CA &lt;br /&gt;&lt;/strong&gt;Enough said. :)&lt;/p&gt;
&lt;p&gt;Did I miss any events? Drop me a comment below!&lt;/p&gt;
&lt;h3&gt;More Notable Content this Month&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Extensions released this month (&lt;/strong&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/site/search?f%5B0%5D.Type=SearchText&amp;amp;f%5B0%5D.Value=LightSwitch&amp;amp;sortBy=Date"&gt;see over 100 of them here!&lt;/a&gt;&lt;strong&gt;):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;UPDATED: &lt;a href="http://visualstudiogallery.msdn.microsoft.com/f08ec227-45e9-4d74-bd20-42c70e63a8e3" target="_blank"&gt;Luminous Tools for LightSwitch&lt;/a&gt; &lt;/strong&gt;by &lt;a href="http://visualstudiogallery.msdn.microsoft.com/site/search?f%5B0%5D.Type=User&amp;amp;f%5B0%5D.Value=YannDuran"&gt;YannDuran (Luminous Software) &lt;/a&gt;A collection of Visual Studio productivity extensions for LightSwitch&lt;/li&gt;
&lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/271db55f-b534-46ea-ad3e-7c79f3cd8795" target="_blank"&gt;Xpert360Lightning - Easter Chick Theme&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/a1fc53c4-a86b-442a-a568-45e3576ef12a" target="_blank"&gt;Xpert360Lightning - Easter Theme&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/241153c9-5b35-4592-897d-7077301d5864" target="_blank"&gt;Xpert360Lightning - Shamrock Theme&lt;/a&gt;&lt;!--EndFragment--&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Samples (&lt;/strong&gt;&lt;a href="http://code.msdn.microsoft.com/vstudio/site/search?f%5B0%5D.Type=SearchText&amp;amp;f%5B0%5D.Value=LightSwitch&amp;amp;sortBy=Date"&gt;see all 98 of them here&lt;/a&gt;&lt;strong&gt;): &lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/vstudio/LightSwitch-and-SignalR-4d7ff7a8" target="_blank"&gt;LightSwitch and SignalR (Visual Studio 2012 Update 2)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Team Articles:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/04/announcing-a-new-preview-of-the-lightswitch-html-client.aspx"&gt;Announcing a New Preview of the LightSwitch HTML Client&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/05/a-new-user-experience.aspx"&gt;A New User Experience (Heinrich Wendel)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/07/a-quick-amp-easy-lightswitch-app-for-sharepoint.aspx"&gt;A quick &amp;amp; easy LightSwitch app for SharePoint (Brian Moore)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/12/designing-for-multiple-form-factors.aspx"&gt;Designing for Multiple Form Factors (Heinrich Wendel)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2013/03/04/getting-started-with-lightswitch-in-visual-studio-2012-update-2-ctp4.aspx"&gt;Getting Started with LightSwitch in Visual Studio 2012 Update 2 CTP4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2013/03/21/master-detail-screens-with-the-lightswitch-html-client.aspx"&gt;Master-Detail Screens with the LightSwitch HTML Client (Beth Massi)&lt;/a&gt;&lt;/li&gt;
&lt;!--EndFragment--&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/28/using-sharepoint-lists-as-lightswitch-entities-and-with-csom-chris-rummel.aspx"&gt;Using SharePoint Lists as LightSwitch Entities and with CSOM (Chris Rummel)&lt;/a&gt;&lt;/li&gt;
&lt;!--StartFragment--&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/18/signed-in-part-1-introduction-andy-kung.aspx" target="_blank"&gt;Signed-In Part 1 &amp;ndash; Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/19/signed-in-part-2-upcoming-events-screen-andy-kung.aspx" target="_blank"&gt;Signed-In Part 2 &amp;ndash; Upcoming Events Screen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/21/signed-in-part-3-guest-list-screen-andy-kung.aspx" target="_blank"&gt;Signed-In Part 3 &amp;ndash; Guest List Screen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/25/signed-in-part-4-authentication-and-branding-andy-kung.aspx" target="_blank"&gt;Signed-In Part 4 &amp;ndash; Authentication and Branding&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/26/signed-in-part-5-search-screen-and-dynamic-ui-andy-kung.aspx" target="_blank"&gt;Signed-In Part 5 &amp;ndash; Search Screen and Dynamic UI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Community Articles:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2013/03/29/lightswitch-and-syncfusion-simply-beautiful-applications/"&gt;#LightSwitch and #Syncfusion: simply beautiful applications ($10.000 April raffle!)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=882"&gt;&amp;ldquo;TheLightSwitchToolbox&amp;rdquo; is born&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=867"&gt;Add a full-blown RIA service to your LightSwitch project in 15 seconds&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://beyondrelational.com/modules/12/tutorials/940/tutorials/18613/getting-started-with-visual-studio-lightswitch-part-7-adding-images-and-text-captions-in-lightswitch-application.aspx"&gt;Adding Images and Text captions in LightSwitch Application&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.thepoweroflightswitch.com/2013/03/beyond-the-data-dump.html"&gt;Beyond the Data Dump or How to leverage Netweaver Gateway and LightSwitch oData functionality in Excel 2013 (Part 1 in Post 2 of a series &amp;ndash; confused yet?)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2013/03/06/create-a-jquery-slider-for-lightswitch-html-pages/"&gt;Create a JQuery slider for LightSwitch HTML pages.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2013/03/22/create-a-jquery-searchbox-for-lightswitch-html-pages/"&gt;Create a JQuery searchbox for LightSwitch HTML pages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://beyondrelational.com/modules/12/tutorials/940/tutorials/18621/getting-started-with-visual-studio-lightswitch-part-10-deploying-the-lightswitch-application.aspx"&gt;Deploying the LightSwitch Application&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2013/03/06/hide-the-savecancelokdiscard-buttons-in-a-lightswitch-html-screen/"&gt;Hide the Save/Cancel/Ok/Discard buttons in a LightSwitch HTML screen.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.lightswitchspecial.com/2013/03/how-to-integrate-telerik-radpivotgrid.html"&gt;How to Integrate Telerik RadPivotGrid in LightSwitch 2012&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2013/03/06/im-going-to-do-something-just-because-its-really-cool/"&gt;I&amp;rsquo;m going to do something, just because it&amp;rsquo;s really cool.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://lightswitchjournal.nl/Articles/tabid/82/articleType/ArticleView/articleId/12/Inspired-LightSwitch-developer-in-a-changing-world.aspx"&gt;&lt;span style="font-size: x-small;"&gt;Inspired LightSwitch-developer in a changing world.&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/183/Joins-and-Left-Outer-Joins-in-LINQ-ndash-Do-you-want-groups-with-that.aspx"&gt;Joins and Left Outer Joins in LINQ&amp;ndash;Do you want groups with that?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.paulspatterson.com/miscellaneous/lightswitch-html-client-tag-cloud/"&gt;LightSwitch HTML Client Tag Cloud&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2013/03/15/lightswitch-news-rss-bringing-you-news-from-around-the-world-httpbit-lylightswitchnewsrss/"&gt;LightSwitch news RSS: bringing you news from around the world! (http://bit.ly/lightswitchnewsRSS)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.thepoweroflightswitch.com/2013/03/quick-and-dirty-crm-target.html"&gt;Quick and Dirty &amp;ndash; Compare your SAP CRM Pipeline to a static target value by leveraging SAP Netweaver Gateway, Visual Studio LightSwitch and Excel 2013 (Part 2: Electric Boogaloo in Post 2 of a series)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=849"&gt;Setting up an integrated build and deploy pipeline for LightSwitch applications (part 1)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=876"&gt;Start web-api commanding in 30 seconds in LightSwitch via Nuget TheLightSwitchToolbox.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.thepoweroflightswitch.com/2013/03/the-power-of-usability.html"&gt;The Power of Usability or How to leverage SAP Netweaver Gateway and Microsoft Office and Visual Studio LightSwitch to meet the needs of the 90% (first in a series)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://beyondrelational.com/modules/12/tutorials/940/tutorials/18620/getting-started-with-visual-studio-lightswitch-part-9-setting-and-extensions-in-lightswitch-application.aspx"&gt;Setting and Extensions in LightSwitch Application&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://beyondrelational.com/modules/12/tutorials/940/tutorials/18615/getting-started-with-visual-studio-lightswitch-part-8-using-the-new-group-box-control-in-lightswitch-application.aspx"&gt;Using the New Group Box Control in LightSwitch Application&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2013/03/07/what-field-do-you-use-to-store-an-image/"&gt;What field do you use to store an Image?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Did I miss any good articles? Drop me a comment below!&lt;/p&gt;
&lt;h3&gt;Top Forum Answerers&lt;/h3&gt;
&lt;p&gt;Thanks to all our contributors to the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/lightswitch/threads"&gt;LightSwitch forums on MSDN&lt;/a&gt;. Thank you for helping make the LightSwitch community a better place. Great job this month from our very own Huy Nguyen who has been really helping out in the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/lightswitchhtml/threads/" target="_blank"&gt;HTML client preview forum&lt;/a&gt;! And another shout out to Yann Duran who consistently shows up in the top 5!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Top 5 forum answerers in March:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table style="width: 400px;" border="1" cellspacing="0" cellpadding="2"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="133"&gt;&lt;strong&gt;User Name&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="133"&gt;&lt;strong&gt;Answers&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="133"&gt;&lt;strong&gt;Posts&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="133"&gt;&lt;a href="http://social.msdn.microsoft.com/Profile/huy%20nguyen%20msft/" target="_blank"&gt;Huy Nguyen MSFT&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top" width="133"&gt;35&lt;/td&gt;
&lt;td valign="top" width="133"&gt;132&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="133"&gt;&lt;a href="http://social.msdn.microsoft.com/profile/yann%20duran/?ws=usercard-mini"&gt;Yann Duran&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top" width="133"&gt;15&lt;/td&gt;
&lt;td valign="top" width="133"&gt;118&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="133"&gt;&lt;a href="http://social.msdn.microsoft.com/profile/dave%20kidder/" target="_blank"&gt;Dave Kidder&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top" width="133"&gt;13&lt;/td&gt;
&lt;td valign="top" width="133"&gt;24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="133"&gt;&lt;a href="http://social.msdn.microsoft.com/profile/Babloo1436/" target="_blank"&gt;Babloo1436&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top" width="133"&gt;12&lt;/td&gt;
&lt;td valign="top" width="133"&gt;32&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="133"&gt;&lt;a href="http://social.msdn.microsoft.com/Profile/heinrich%20m.%20wendel/" target="_blank"&gt;Heinrich M. Wendel&lt;/a&gt;&lt;/td&gt;
&lt;td valign="top" width="133"&gt;8&lt;/td&gt;
&lt;td valign="top" width="133"&gt;29&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Keep up the great work guys!&lt;/p&gt;
&lt;h3&gt;LightSwitch Team Community Sites&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.facebook.com/vslightswitch"&gt;&lt;img style="margin: 0px 6px 0px 0px;" src="http://badge.facebook.com/badge/151211271561073.1904.953280091.png" alt="" align="left" border="0" /&gt;&lt;/a&gt; Become a fan of &lt;a href="http://www.facebook.com/vslightswitch"&gt;Visual Studio LightSwitch on Facebook&lt;/a&gt;. Have fun and interact with us on our wall. Check out the cool stories and resources. Here are some other places you can find the LightSwitch team:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/lightswitch/threads"&gt;LightSwitch MSDN Forums&lt;/a&gt; &lt;br /&gt;&lt;a href="http://msdn.com/lightswitch"&gt;LightSwitch Developer Center&lt;/a&gt; &lt;br /&gt;&lt;a href="http://blogs.msdn.com/lightswitch"&gt;LightSwitch Team Blog&lt;/a&gt; &lt;br /&gt;&lt;a href="http://twitter.com/#!/VSLightSwitch"&gt;LightSwitch on Twitter&lt;/a&gt; (@VSLightSwitch, #VS2012 #LightSwitch)&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10407016" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Rollup/">Rollup</category></item><item><title>Master-Detail Screens with the LightSwitch HTML Client</title><link>http://blogs.msdn.com/b/bethmassi/archive/2013/03/21/master-detail-screens-with-the-lightswitch-html-client.aspx</link><pubDate>Thu, 21 Mar 2013 16:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10404044</guid><dc:creator>Beth Massi</dc:creator><slash:comments>10</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10404044</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2013/03/21/master-detail-screens-with-the-lightswitch-html-client.aspx#comments</comments><description>&lt;p&gt;Since we released the latest version of the &lt;a href="http://msdn.com/lightswitch/htmlclient" target="_blank"&gt;LightSwitch HTML Client&lt;/a&gt; a couple weeks ago, the team has been cranking out some awesome content on the &lt;a href="http://blogs.msdn.com/b/lightswitch/" target="_blank"&gt;LightSwitch Team blog&lt;/a&gt; around the new capabilities as well as some good How-To’s. And there’s a lot more coming! &lt;/p&gt;  &lt;p&gt;If you’re just getting started with the HTML client, see: &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2013/03/04/getting-started-with-lightswitch-in-visual-studio-2012-update-2-ctp4.aspx"&gt;Getting Started with LightSwitch in Visual Studio 2012 Update 2 &lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In this post I want to show you how you can use the &lt;a href="http://msdn.microsoft.com/en-US/library/vstudio/jj674623.aspx" target="_blank"&gt;LightSwitch &lt;strong&gt;Screen Designer&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; &lt;/strong&gt;to create master-detail screens the way &lt;strong&gt;you &lt;/strong&gt;want them. The Screen Designer is very flexible in allowing you to customize the screen layouts, it just takes some practice. In fact, there are so many goodies in the Screen Designer I won’t be going over all you can do (look for some videos on that soon). Instead I want to focus on a couple different ways you can present master-detail screens. What inspired me to write this post was Heinrich’s brilliant article on &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2013/03/12/designing-for-multiple-form-factors.aspx"&gt;Designing for Multiple Form Factors&lt;/a&gt; which explains how LightSwitch does all the heavy-lifting for you to determine the best way to lay out content on a screen depending on the screen size.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;I’ll present a couple different ways you can design master-detail screens to get your creative juices flowing, but keep in mind these are just suggestions. In the end you have total flexibility to create screens the way you need with your data and users in mind.&lt;/p&gt;  &lt;h3&gt;Setup our Data Model&lt;/h3&gt;  &lt;p&gt;I’m going to use an application that we built in the &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/12/01/beginning-lightswitch-getting-started.aspx"&gt;Beginning LightSwitch Series&lt;/a&gt; and extend it with a mobile client. It’s a very simple application that manages contacts or business partners. This would typically be part of a larger business system but for this example it works well because there are multiple one-to-many relationships. &lt;a href="http://code.msdn.microsoft.com/Beginning-LightSwitch-in-c6debf15"&gt;Download the Sample App&lt;/a&gt; and feel free to follow along at home! &lt;/p&gt;  &lt;p&gt;Here’s our data model. A Contact has a one-to-many relationship between its PhoneNumbers, EmailAddresses and Addresses.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8105.image3_5F00_68C8EF7F.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7607.image3_5F00_thumb_5F00_202F00AE.png" width="705" height="525" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Add an HTML Client “Home” Screen&lt;/h3&gt;  &lt;p&gt;First we need to upgrade this application to take advantage of the new HTML client, then we’ll be able to add a screen that users will see when they launch the app. &lt;/p&gt;  &lt;p&gt;In the Solution Explorer, right-click on the project and select “Add Client…”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7737.image_5F00_46CBA968.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2045.image_5F00_thumb_5F00_1F916033.png" width="336" height="351" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Name the client “HTMLClient” and click OK. This will upgrade your project from LightSwitch version 2 to version 3. You’ll now see a node called “HTMLClient (startup)” in the Solution Explorer. Right-click on that and select “Add Screen…” and choose the &lt;strong&gt;Browse Data Screen&lt;/strong&gt; template. Select the “SortedContacts” query as the Screen Data and name the screen “Home” then click OK. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4370.image10_5F00_4690E3F9.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0257.image10_5F00_thumb_5F00_2D28E0BF.png" width="698" height="499" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next, let’s modify what we’re showing in the list. In the Screen Designer, change the Summary control to a Columns Layout. A Summary control displays the first string field defined on the entity in the &lt;a href="http://msdn.microsoft.com/library/vstudio/ee256715.aspx" target="_blank"&gt;Data Designer&lt;/a&gt;. However we want to see both the FirstName &amp;amp; LastName so a Columns Layout will do this for us. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8814.image_5F00_107A8159.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5265.image_5F00_thumb_5F00_2FBD282C.png" width="297" height="214" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Run the application (&lt;strong&gt;F5&lt;/strong&gt;). Since there’s already some data in this sample, you’ll see a few contacts displayed in the list. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4682.image_5F00_6F870EB1.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4101.image_5F00_thumb_5F00_5D3E47EF.png" width="399" height="393" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now let’s see a couple ways in which we can present the contact details as well as their related data, PhoneNumbers, EmailAddresses &amp;amp; Addresses.&lt;/p&gt;  &lt;h3&gt;Master-Details with Tab Controls&lt;/h3&gt;  &lt;p&gt;Close the app and return to the Screen Designer for the Home screen. Select the List control and in the Properties Window set the Item Tap action by clicking on the link.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6232.image_5F00_6F1ADBBC.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4111.image_5F00_thumb_5F00_0ABF67B3.png" width="704" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Then select the SortedContacts.viewSelected method and click OK to create a new screen.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2538.image_5F00_63851E7D.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3603.image_5F00_thumb_5F00_0E5D8290.png" width="505" height="224" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This will open the familiar Add New Screen dialog with the View Details Screen already selected. Make sure to check off the additional data to include the EmailAddresses, PhoneNumbers and Addresses. Then click OK.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3301.image28_5F00_7E63281C.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1346.image28_5F00_thumb_5F00_4BFF549D.png" width="698" height="498" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;By default, LightSwitch will set up the contact details and all the related children into separate Tab controls. When we run the app again, the tabs appear across the top in a scrollable/swipe-able container. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4760.image_5F00_546E3FA3.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3583.image_5F00_thumb_5F00_08A268EA.png" width="644" height="253" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As we open each tab, you will see a simple list of items displayed. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4276.image_5F00_2BEF5D8F.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4760.image_5F00_thumb_5F00_32A26712.png" width="647" height="239" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Let’s see how we can customize these lists a little better so that a user can see all the data at one glance as well as formatting the data better. &lt;/p&gt;  &lt;p&gt;Back in the Screen Designer for the ViewContact screen, first select the Email Addresses List and change it to a Tile List. This will automatically change the Summary control to a Rows Layout and will set the Email field to display as a formatted, clickable email address. Let’s also de-emphasize the Email Type field by setting its Font Style to “Small”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7206.image_5F00_6742C34D.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0451.image_5F00_thumb_5F00_38E93DA0.png" width="630" height="218" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Repeat the same process for Phone Numbers and Addresses. For Addresses, in order to show the City State &amp;amp; ZIP on one line of the tile, select the Rows Layout and under the field list click + Add, and select New Group. Then change the control to a Columns Layout and add the City State &amp;amp; ZIP fields to that group. In the end, your screen’s content tree should looks like this. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0066.image_5F00_2AAAC4B0.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7888.image_5F00_thumb_5F00_582BE473.png" width="315" height="709" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now when we run it, you’ll see our data displayed and formatted much better.&lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2021.image_5F00_49ED6B83.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2514.image_5F00_thumb_5F00_09B75209.png" width="644" height="222" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Using Tab controls for master-details screens is a good idea when you will potentially have a lot of child data to display or you are targeting smaller mobile devices like phones. This limits the amount of (potentially overwhelming) information that a user has to view at once.&lt;/strong&gt; &lt;/p&gt;  &lt;h3&gt;Editing Data in Tabs&lt;/h3&gt;  &lt;p&gt;Now let’s see how we can &lt;strong&gt;edit &lt;/strong&gt;our data using the Tab design. Go back to the ViewContact screen and under the Details Tab expand the Command Bar and click +Add to add a button. Select an existing method Contact.edit and click OK to create a new screen. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3107.image_5F00_3E57AE44.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0066.image_5F00_thumb_5F00_450AB7C7.png" width="514" height="333" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The Add New Screen dialog will open with an Add/Edit Details Screen template automatically selected with the data we want. This time I’m not going to select all the related children because we’ll be editing each tab of data separately in this design. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6507.image_5F00_4B26EEB3.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3060.image_5F00_thumb_5F00_23143F94.png" width="704" height="503" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Click OK and this will open the Add Edit Contact screen in the designer. Go back to the ViewContact screen by clicking the back arrow at the upper left hand side of the designer. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8473.image_5F00_35F3D8ED.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2110.image_5F00_thumb_5F00_47D06CBA.png" width="218" height="87" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Select the Edit Contact button we just added and change the icon to “Edit”. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0042.image_5F00_1C8BD5B3.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7206.image_5F00_thumb_5F00_3C3AAF7B.png" width="693" height="265" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now when we run the application you will see the Edit Contact button in the command bar and clicking it will bring up the Edit screen for our contact. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5238.image_5F00_5BE98943.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8546.image_5F00_thumb_5F00_2D23D0A1.png" width="713" height="558" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now let’s provide editing of data for the rest of our tabs. Go back to the ViewContact screen and select Tile List control for Email Addresses and set it’s Tap action to an existing method: EmailAddresses.editSelected and click OK to create a new screen.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7701.image_5F00_61C42CDC.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0451.image_5F00_thumb_5F00_017306A5.png" width="631" height="449" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Accept the defaults on the Add New Screen dialog by clicking OK. This will navigate the Screen Designer to the new AddEditEmailAddresses screen. Drag the Email &amp;amp; Email Type fields under the Command Bar and delete the Columns Layout control. We don’t need to display the Contact to the user, this is automatically set for us from the previous screen. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0435.image_5F00_73348DB4.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2185.image_5F00_thumb_5F00_40D0BA35.png" width="291" height="151" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now go back to the ViewContact screen by clicking the back arrow at the upper left hand side of the designer again. Next select the Command Bar directly above the Tile List and add a new button. Choose the existing method EmailAddresses.addAndEditNew. Notice LightSwitch will correctly suggest that we use the same screen we just created. Click OK. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4336.image_5F00_009AA0BB.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1425.image_5F00_thumb_5F00_59605785.png" width="530" height="319" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Select the button and this time set the Icon to “Add” in the properties window. Repeat these steps for PhoneNumbers and Addresses to add editing and adding capabilities to the rest of the tabs. Now when we run it and edit a Contact, you will see a button in the command bar of each of the tabs that allow you to add new child records. If you click an item in the Tile List, you will see the edit screen instead. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7384.image_5F00_32260E50.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3250.image_5F00_thumb_5F00_0AEBC51B.png" width="687" height="366" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As I mentioned this technique of allowing targeted edits of data in separate tabs is useful when displaying large amount of data to users with small form factor mobile devices. Typically users will not be entering large amounts of data but instead be “tweaking” (making small edits to) what data is already there. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;However the screen designer is not limited to this screen flow. If you want to display more data on a screen you can totally do that. &lt;/strong&gt;For instance, in our example it’s unlikely we will have more than three phone numbers, email addresses or addresses for a contact. It might make better sense to show everything on one screen, even if it is a phone, and just have the user scroll the screen vertically. Or maybe we’re targeting tablet users primarily and we don’t want to have to force them to enter the data on small screens with lots of clicks to the Save button. If we’re entering contact information, then most likely we want to capture all the data at once. Let’s see how we can do that.&lt;/p&gt;  &lt;h3&gt;Master-Details Full Screen Alternative&lt;/h3&gt;  &lt;p&gt;First let’s change our View Contact screen. First drag all the Add buttons from the child Tabs Command Bars to the top Command Bar. Then drag each of the Tile Lists into the Details Tab and then delete the now empty child tabs. Finally, select the Tile Lists and in the properties window check the “Show Header” checkbox.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3755.image_5F00_43966F28.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8358.image_5F00_thumb_5F00_3F1FEE61.png" width="668" height="686" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;This allows the user to see all the information at once. LightSwitch will automatically adjust the screen layout as necessary as we resize our browser. This particular example works well for smaller sets of data because we’ll never have more than a handful of child data.&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0652.image_5F00_6DBB0761.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4527.image_5F00_thumb_5F00_1107FC07.png" width="427" height="531" /&gt;&lt;/a&gt;&amp;#160; &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2772.image_5F00_5EA42887.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8156.image_5F00_thumb_5F00_7E53024F.png" width="201" height="531" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here’s what it looks like on my phone when I scroll to the children. Notice the command bar is always shown on the bottom no matter where you scroll. Also if I tap the email link it will start an email automatically and when I tap the phone number link the phone will ask to dial the number. But if I tap on the tile, it will open the associated Edit screen. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2287.image_5F00_60E4363B.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5417.image_5F00_thumb_5F00_2041E9CC.png" width="267" height="403" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can also add specific buttons to edit the lists instead of requiring the user to tap on the tiles. In fact, you don’t even need to put buttons in the Command Bar. In the Screen Designer, you can add a button anywhere to a screen simply by right-clicking on a any item in the content tree or by selecting “Add Layout Item” at the top of the Screen Designer and choosing “Button…”. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3644.image_5F00_2739073B.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2161.image_5F00_thumb_5F00_6702EDC0.png" width="360" height="122" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What about adding a new contact? Let’s go back to our Home screen and add that ability. Since the user is almost always going to add additional data when entering a new contact, let’s create a screen we can use for new contacts that allows us to enter them in one dialog. &lt;/p&gt;  &lt;p&gt;Specific to this sample, is a permissions check to allow inserts into the contact table. We’ll need to grant that permission for our debug session if we want to test this so open up the project properties and on the Access Control tab, check off “Granted for Debug” on the app-specific permissions. &lt;/p&gt;  &lt;p&gt;Now open the Home Screen and add a button to the Command Bar. Select the existing method SortedContacts.addAndEditNew then select (New Screen…) to Navigate to. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2654.image_5F00_3FC8A48B.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3247.image_5F00_thumb_5F00_5B6D3081.png" width="562" height="353" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This time go ahead and include all the related data on the screen and name the screen AddContact. Click OK.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5123.image_5F00_1E01DC18.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0310.image_5F00_thumb_5F00_6412992B.png" width="690" height="491" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We’ll set this screen up very similar to the ViewContact screen but this time we’ll allow editing of all the data fields. First add “Add” buttons to the top Command Bar so the user can add Email Addresses, Phone Numbers and Addresses to their new contact all on one screen. Select the existing methods .addAndEditNew and go with the suggested Navigate To screens we already added previously. &lt;/p&gt;  &lt;p&gt;Now just like before, change the Lists to Tile Lists in order to display all the fields in the Tile. This time however, change the field controls to &lt;strong&gt;editable controls&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Next drag each of the Tile Lists into the Details Tab and then delete the now empty child tabs. Finally, select the Tile Lists and in the properties window check the “Show Header” checkbox.&lt;/p&gt;  &lt;p&gt;You should end up with the screen content tree looking like this. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1588.image_5F00_6C715E64.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6862.image_5F00_thumb_5F00_5E32E574.png" width="312" height="652" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And now when we run this and add a Contact, you are able to enter all the data at once on one screen. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8424.image_5F00_59BC64AD.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1588.image_5F00_thumb_5F00_6B2CC585.png" width="422" height="578" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;By default all edit screens are shown as dialogs. As the screen size decreases, LightSwitch will show the dialog as full screen, however, in this case we probably want to force it so that as much of the screen is shown to the user as possible all the time. Particularly for tablet form factors with larger screens, it would be better to show this screen in full view. &lt;/p&gt;  &lt;p&gt;We can force the screen to display as full screen by opening the Screen Designer and selecting the screen node at the top. Then in the properties window uncheck “Show as Dialog”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1172.image_5F00_3CD33FD8.png"&gt;&lt;img title="image" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3323.image_5F00_thumb_5F00_4386495B.png" width="419" height="176" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now when we run the app again and add a new contact, the screen takes up the full width &amp;amp; height of the browser. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5282.image_5F00_1C4C0026.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0027.image_5F00_thumb_5F00_69E82CA6.png" width="422" height="545" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Wrap Up&lt;/h3&gt;  &lt;p&gt;I hope I showed you a couple different ways you can create master-detail screens with the &lt;a href="http://msdn.com/lightswitch/htmlclient" target="_blank"&gt;LightSwitch HTML client&lt;/a&gt; (and we did it without writing any code!). Of course you can pick and choose which techniques apply to your situation or come up with a completely different approach. The point is the screen designer is very flexible in what it can do, it just takes a little practice. &lt;/p&gt;  &lt;p&gt;In closing, here are some tips to keep in mind:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;LightSwitch will automatically adjust the screen layout as necessary for different form factors.&amp;#160; &lt;/li&gt;    &lt;li&gt;Using Tab controls for master-details screens is a good idea when you will potentially have a lot of child data to display or you are targeting smaller mobile devices like phones. This limits the amount of information that a user has to view/edit at once.&amp;#160; &lt;/li&gt;    &lt;li&gt;Showing all the data on a screen works well for smaller sets of data where you’ll never have more than a handful of child data to view/edit at once (like in our example) or when your users are using larger devices like tablets. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I should also point out that there are a lot of hooks for creating custom controls and styling of the app that you can utilize for your unique situations, maybe I’ll dig into that in a future post.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10404044" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Screens/">Screens</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS2012/">VS2012</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/HTML/">HTML</category></item></channel></rss>