Hi
I have different html pages in my app that i will like to view locally in my app the code below can only view single html page but what i want is To display different
html pages according to date of the month in a webview
This is my code below
xaml
xaml.cs
public partial class MainPage : PhoneApplicationPage
{
private List
private int CurrentIndex = 0;
private int TotalCount = 0;
// Constructor
public MainPage()
{
InitializeComponent();
// Sample code to localize the ApplicationBar
//BuildLocalizedApplicationBar();
this.Loaded += MainPage_Loaded;
}
private void MainPage_Loaded(object sender, RoutedEventArgs e)
{
htmls = new List
TotalCount = htmls.Count;
if (TotalCount != 0)
{
webBrowser1.Navigate(new Uri(htmls[CurrentIndex], UriKind.Relative));
}
}
private void Previous_Click(object sender, EventArgs e)
{
if (CurrentIndex != 0)
{
CurrentIndex--;
}
webBrowser1.Navigate(new Uri(htmls[CurrentIndex], UriKind.Relative));
}
private void Next_Click(object sender, EventArgs e)
{
if (CurrentIndex != TotalCount - 1)
{
CurrentIndex++;
}
webBrowser1.Navigate(new Uri(htmls[CurrentIndex], UriKind.Relative));
}
Kindly help
Replies
Know the answer? Post it — somebody with the same question will find it here.