HTML is Hyper Text Markup Language, which is used for creating web pages. If you want to create a web page in LightSwitch application, you can do it.
Step by step solution
Step 1 : Open Visual Studio LightSwitch->Right click on screen->Add new screen.

Step 2 : Select new data screen->Write screen name (WebPage) ->Ok.

Step 3 : Now add data item->Select local property->Type (String)->Ok.

Step 4 : Move prpWebPage from screen to screen commandBar.

Step 5 : Go to prpWebPage property->Click change custom control.

Step 6 : Now select WebBrowser->Ok.

Step 7 : Go to .cs
page of prpWebPage screen then write the following code.
using System;
using
System.Linq;
using System.IO;
using
System.IO.IsolatedStorage;
using
System.Collections.Generic;
using
Microsoft.LightSwitch;
using
Microsoft.LightSwitch.Framework.Client;
using
Microsoft.LightSwitch.Presentation;
using
Microsoft.LightSwitch.Presentation.Extensions;
namespace
LightSwitchApplication
{
public partial
class WebPage
{
private void
webControlAvailable(object sender,
ControlAvailableEventArgs e)
{
string strHtml =
"<h1>Hello World!</h1>";
((System.Windows.Controls.WebBrowser)e.Control).NavigateToString(strHtml);
}
}
}
Step 8 : Run application (Press F5).


Join the conversation! Your thoughts help the community grow.