Hi evoteam21,
Please refer below sample code.
HTML
<asp:Label ID="LabelUpdateVersion" runat="server"></asp:Label>
Namespace
C#
using System.Net;
VB.Net
Imports System.Net
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
this.GetUpdateVersion();
}
}
private void GetUpdateVersion()
{
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
string version = (new WebClient()).DownloadString("https://raw.githubusercontent.com/Th3AnG3L/Azeroth-StartUp/master/Update.txt");
LabelUpdateVersion.Text = version.Split('=')[1].Trim();
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not Me.IsPostBack Then
GetUpdateVersion()
End If
End Sub
Private Sub GetUpdateVersion()
ServicePointManager.Expect100Continue = True
ServicePointManager.SecurityProtocol = CType(3072, SecurityProtocolType)
Dim version As String = (New WebClient).DownloadString("https://raw.githubusercontent.com/Th3AnG3L/Azeroth-StartUp/master/Update.txt")
LabelUpdateVersion.Text = version.Split("=")(1).Trim()
End Sub
Output
1.0.2