mcrmg
asked on
Syntax question II
With EEs help, I have the code like this
I was wondering if there is a way to replace MoveAllbtn (the ID of the button) dynamically. So, buttonId can be in the code...thanks
System.Web.UI.AttributeCol lection attributColl = (System.Web.UI.AttributeCo llection)MoveAllbtn.Attributes;
protected void MoveAllbtn_Click(object sender, EventArgs e)
{
Button button = (Button)sender;
string buttonId = button.ID;
foreach (var item in listBox1.Items.Cast<ListItem>().Reverse())
{
//somthing here
}
System.Web.UI.AttributeCollection attributColl = (System.Web.UI.AttributeCollection)MoveAllbtn.Attributes;
if (attributColl != null && attributColl.Count > 0 && attributColl["CustomParameter"] != null)
{
string myCustomParameterValue = attributColl["CustomParameter"];
testBox.Text = myCustomParameterValue;
}
testBox.Text = buttonId;
}
I was wondering if there is a way to replace MoveAllbtn (the ID of the button) dynamically. So, buttonId can be in the code...thanks
System.Web.UI.AttributeCol
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER