Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Master Page problem

Master Page problem

Scheduled Pinned Locked Moved ASP.NET
help
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    raghvendrapanda
    wrote on last edited by
    #1

    I have written the following code. on Label1.Text error is coming i.e,"Object reference not set to an instance of an object." Calendar mpcalender = (Calendar)Page.Master.FindControl("Calendar1"); dat = mpcalender.SelectedDate.Date.ToString(); Label1.Text = dat.ToString(); Session["seldate"] = dat; Calender control is on the masterpage and Label control is on th ContentPlaceHolder. Plz help.

    K A 2 Replies Last reply
    0
    • R raghvendrapanda

      I have written the following code. on Label1.Text error is coming i.e,"Object reference not set to an instance of an object." Calendar mpcalender = (Calendar)Page.Master.FindControl("Calendar1"); dat = mpcalender.SelectedDate.Date.ToString(); Label1.Text = dat.ToString(); Session["seldate"] = dat; Calender control is on the masterpage and Label control is on th ContentPlaceHolder. Plz help.

      K Offline
      K Offline
      Krazy Programmer
      wrote on last edited by
      #2

      is label in the master page

      If You win You need not Explain............ But If You Loose You Should not be there to Explain......

      1 Reply Last reply
      0
      • R raghvendrapanda

        I have written the following code. on Label1.Text error is coming i.e,"Object reference not set to an instance of an object." Calendar mpcalender = (Calendar)Page.Master.FindControl("Calendar1"); dat = mpcalender.SelectedDate.Date.ToString(); Label1.Text = dat.ToString(); Session["seldate"] = dat; Calender control is on the masterpage and Label control is on th ContentPlaceHolder. Plz help.

        A Offline
        A Offline
        Amit Agarrwal
        wrote on last edited by
        #3

        Please confirm whether your Lable control is on child page or on master page...

        Amit Agarwal

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups