Hi nauna,
Check this example. Now please take its reference and correct your code.
Resourcefile Data
Name: Message
Value: Welcome to ASPSnippets.
Class
C#
public static class MyClass
{
public static string Message = Resources.Resource.Message;
}
VB.Net
Public Class MyClassVB
Public Shared Message As String = Resources.Resource.Message
End Class
HTML
<asp:Label ID="lblMessage" runat="server" />
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
string name = MyClass.Message;
lblMessage.Text = name;
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim name As String = MyClass.Message
lblMessage.Text = name
End Sub
Screenshot