<%@ MasterType virtualPath="~/MasterPage.master"%>
include this after the page directive so that you can access the master page controls.
in the code behind file access the label/any ctrl of the master page and set the count of the cart to that label when there are some changes.eg.whenever u add a new item to ur cart/whenever u remove an item from ur cart.The value of ur cart must be updated.better to create a user defined funtion in which u update the cart value and call in the page load event.
Following Sample Code Denotes how to access the masterpage control from the child page,
cmd = new SqlCommand("Select Quantity from MyCart", con);
Ramakrishna188, if this helps please login to Mark As Answer. | Alert Moderator
dr = cmd.ExecuteReader();
Label mlabelcart = (Label)Master.FindControl("lblcartvalue");
mlabelcart.Text = "(" + dr["Quantity"].ToString() + ")";