hi..
i was added media player control in select item template inside datalist control..
my coding is like this for to show the selectitem template
protected void CustomerDataList_ItemCommand(
object source, DataListCommandEventArgs e)
{
if (e.CommandName == "Details")
{
Media_Player_ASP.NET_Control.Media_Player_Control m;
dl.SelectedIndex = e.Item.ItemIndex;
Label lb1 = (Label)e.Item.FindControl("Label1");
Cache["idd"] = lb1.Text;
Label lb = (Label)e.Item.FindControl("Label2");
string s = lb.Text;
m = (Media_Player_ASP.NET_Control.Media_Player_Control)e.Item.FindControl("mp11");
m.MovieURL = Server.MapPath(lb.Text);
m.AutoStart = true;
DataBind();
}
it does not finds the label control also and also it come to these lines
m = (Media_Player_ASP.NET_Control.Media_Player_Control)e.Item.FindControl("mp11");
m.MovieURL = Server.MapPath(lb.Text);
it shows error like this
"Object reference not set to an instance of an object."
how to tackle this problem..
need ur suggestions in brief manner..
regards
gopal.s