Link to home
Start Free TrialLog in
Avatar of mcrmg
mcrmg

asked on

The name does not exist in the current context

hi,

I installed VS2017 and am moving webpages from website into a new webapplication. I am getting


Error      CS0103      The name 'msg' does not exist in the current context      


any ideas?  thanks


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;




public partial class CremacLogin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {


        Session["level"] = null;
        Session["user"] = null;

        msg.Text = Request.QueryString["msg"];


    }

Open in new window

Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

It seems that you are missing msg in your aspx file. Please check.
If more help needed, please add your aspx file.
Avatar of mcrmg
mcrmg

ASKER

thanks for the quick reply. There is msg in the aspx file.  thanks

 <center><asp:Label id="msg" runat="server" style="font-weight:bold"></asp:Label>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial