Hello...
I have two things.
1.User Control viz. a Gridview.
2.Repeater, inside a div and appear on mouseover event of an span, on Masterpage
Well whenever I clicked on a Button, which is on another page and this page is inheriting the MasterPage, the user control gridview get updated and show the inserted data...
and the repeater should also be updated with the same...
Like If I want to make any DML on User Control Gridview on Button event simultaneously Repeater should get updated.
I tried to get Master Page on User Controls I got success in this but further when I tried get the object of repeater this tells me "object reference is not set to an instance".
here is the code...
On User Control
con.Open();
OdbcCommand com = new OdbcCommand("select a.pid,b.productname,b.ThumbImageUrl, a.price,a.total,a.quantity from tempcart a,product b where a.sessionid='" + Session["ID"] + "' and a.pid=b.productid", con);
OdbcDataAdapter da = new OdbcDataAdapter(com);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
if (ds.Tables[0].Rows.Count > 0)
{
MasterGrocery mstr = new MasterGrocery();
Repeater rptr = (Repeater)mstr.FindControl("gvShow");
rptr.DataSource = ds;
rptr.DataBind();
HtmlControl bbbbb = (HtmlControl)mstr.FindControl("spnMyBag");
bbbbb.Visible = true;
}
Please Guide me
Regards