Tuesday, March 20, 2012

Accessing Master Page Control

Recently I needed to access master page control in the Master file of Page.
Here is the sample for this:
//Menu1 is the Menu in Master Page controlMenu objMenu = (Menu) this.Form.Parent.FindControl("Menu1");

//Resetting image
objMenu.Items[1].ImageUrl = "../images/icoAlert.gif";

No comments:

Post a Comment

Your project is not referencing the "MonoAndroid,Version=v8.1" framework. Add a reference to "MonoAndroid,Version=v8.1" in the "frameworks" section of your project.json, and then re-run NuGet restore.

I had  the same problem. Reason: file obj/project.assets.json target "MonoAndroid,Version=v7.1" when my project target androi...