Question: Hey, I'm getting an error in C# ASP.net here is the code: public partial class Site : System.Web.UI.MasterPage { //page load event protected void Page_Load(object

Hey, I'm getting an error in C# ASP.net here is the code:

 public partial class Site : System.Web.UI.MasterPage { //page load event protected void Page_Load(object sender, EventArgs e) { //displaying current date on the label lblDate.Text = DateTime.Now.ToString(); } }

and in site.master I have:

Two Column Layout.


<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="MillerDylanTwoColumn.site" %>

The error I'm getting is: Error CS0103 The name 'lblDate' does not exist in the current context Can anyone show me where I went wrong? Thanks.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!