views:

26

answers:

0

Hi,

I have some assets listed in master page, whose id is added to the hidden field on master page on selection of the asset. Now i need to plot these assets location on google map in the content page. What i need to do is, whenever i select/deselect any asset from the master page the map on content page has to be updated simultaniously.

What all i have done till now is, i have successfully managed the selected or deselected ids in the hidden field on master page.

Firstly ia have added : <%@ MasterType VirtualPath="~/MasterPage.master" %> to content page.

Then I have exposed controls(hidden field) on master page as public properties.

public HiddenField PropertyMasterHiddenVehicles
    {
        get { return hdv_vehicles; }
    }

Then, expose public methods on master page for content page to call

public void SetMasterVehValue(string veh)
    {
        hdv_vehicles.Value = veh;
    }

And on Content page :

// raised an event on valuechanged event of hidden field
protected void Page_Init(object sender, EventArgs e)
    {
        Master.PropertyMasterHiddenVehicles.ValueChanged += new EventHandler(PropertyMasterHiddenVehicles_ValueChanged);
    }

//Send text from Master Box 1 to Content Box 1
    protected void PropertyMasterHiddenVehicles_ValueChanged(object sender, EventArgs e)
    {
        //option 1. use master page public property
        selectedIds = Master.GrpPropOnMasterPage;
        lbl.Text = selectedIds;
    }

After all this, i'm not getting any result on content page, Please somebody could help me in this.

Khushi