By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,028 Members | 1,869 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,028 IT Pros & Developers. It's quick & easy.

compare two buttons

P: n/a
I am trying to compare two buttons in ItemDataBound, one button is inside the
FooterTemplete and the other inside the ItemTemplate but getting this error
message: 'btnServiceReturn' conflicts with the declaration
'intranet.ComputerServices.Private.IMS.laptop_deta ils.btnServiceReturn'

what am i doing wrong? here is the code.. many thanks
public void rptService_ItemDataBound(object s, RepeaterItemEventArgs e)
{

if (e.Item.ItemType == ListItemType.Footer)
{
Button btnServiceBook =
(Button)e.Item.FindControl("btnServiceBook");
}

if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{

Button btnServiceReturn = (Button)e.Item.FindControl("btnServiceReturn");

}

if(btnServiceReturn.Visible == true)
{
btnServiceBook.Visible = false;
}

}
Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.