Use of Web Address Datatype in LightSwitch Using Visual Studio 2012

This article describes the use of the Web Address datatype in LightSwitch using Visual Studio 2012.

The following is the procedure for using the Web Address type in LightSwitch 2012.

Step 1

Open the Solution Explorer.

web solu explo.jpg

Step 2

In the Solution Explorer, right-click on the data source and choose "Add Table".

web add table.jpg

Step 3

The Table appears. Inside the table, for the SiteLink field I have used Web Address as the data type.

table web.jpg

Step 4

Right-click on the Screens and choose "Add Screen".

add web src.jpg

Step 5

Select the List and Details Screen from the Screen Template. Under Screen Information we provide the Screen Name and Screen Data and then click OK.

list and detail src.jpg

Step 6

The Screen Designer appears.

web src designer.jpg

Step 7

Press F5 to run the application. Add a new employee by clicking on the plus symbol given on the left side of the screen. When we click we get an Add New Employee Dialog Box. The "Test" link button is initially disabled.

empty output.jpg

Step 8

Inserting the value in the following textboxes or by filling a valid URL for the SiteLink field, we will notice that a "Test" link button is enabled. This button link allows you to test the web address that you entered into the field.

add data to output.jpg

Step 9

As we click on the "Test" button link, the application tries to open the URL that you have provided in the default browser as shown.

google.com.jpg


Similar Articles