Ahmed Khalid

Ahmed Khalid

  • NA
  • 114
  • 5.5k

Display a Welcome Message using a Label

Feb 26 2023 9:50 AM

Hi,

I have implemented a simple Welcome message display using a Label in my development environment that is hosted on a LocalHost. Its working quite fine. However, when i deployed it in live environment on a remote server, the Welcome Message is not getting displayed. I tried it in 2 different pages but still its not getting displayed. Any help? Thanks in advance

Here is the piece of code that i have structured:

.aspx extension

<center>
   <h2><b>Welcome to Baraamej Website</b></h2>
   <p>This is a private website</p>
    <asp:Label Style="color: green" Font-Bold="true" ID="Lbl_HellowMsg" Font-Size="XX-Large" runat="server" Text=""></asp:Label>
</center>

.cs extension

protected void Page_Load(object sender, EventArgs e)
{
    // display Welcome User Message
    if (!IsPostBack)
    {
        // display Hello User Message
        Lbl_HellowMsg.Text += "Welcome " + (String)Session["FullName"];
    }
}

Thanks


Answers (6)