本文整理汇总了C#中System.Web.UI.WebControls.ImageButton.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# ImageButton.GetValue方法的具体用法?C# ImageButton.GetValue怎么用?C# ImageButton.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.WebControls.ImageButton
的用法示例。
在下文中一共展示了ImageButton.GetValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: invertLEDs
private void invertLEDs()
{
List<bool> tempList = new List<bool>();
List<byte> byteList = new List<byte>();
foreach (TableRow row in Table1.Rows)
{
foreach (TableCell cell in row.Cells)
{
ImageButton[] iBArray = new ImageButton[1];
cell.Controls.CopyTo(iBArray, 0);
int rowIndex = int.Parse(((ImageButton)iBArray.GetValue(0)).CommandArgument.Split(',')[0]);
int columnIndex = int.Parse(((ImageButton)iBArray.GetValue(0)).CommandArgument.Split(',')[1]);
if (((ImageButton)iBArray.GetValue(0)).ImageUrl.Equals(imgTagOff))
{
((ImageButton)iBArray.GetValue(0)).ImageUrl = imgTagOn;
}
else
{
((ImageButton)iBArray.GetValue(0)).ImageUrl = imgTagOff;
}
}
}
}
示例2: loopThroughLEDs
private void loopThroughLEDs()
{
List<bool> tempList = new List<bool>();
List<byte> byteList = new List<byte>();
foreach(TableRow row in Table1.Rows)
{
foreach(TableCell cell in row.Cells)
{
ImageButton[] iBArray = new ImageButton[1];
cell.Controls.CopyTo(iBArray,0);
int rowIndex = int.Parse(((ImageButton)iBArray.GetValue(0)).CommandArgument.Split(',')[0]);
int columnIndex = int.Parse(((ImageButton)iBArray.GetValue(0)).CommandArgument.Split(',')[1]);
if (((ImageButton)iBArray.GetValue(0)).ImageUrl.Equals(imgTagOff))
{
tempList.Add(false);
}
else
{
tempList.Add(true);
}
if(tempList.Count == 8)
{
byteList.Add(Helpers.PanelHelper.convertToByte(tempList.ToArray()));
tempList = new List<bool>();
}
}
}
Helpers.PanelHelper pHelper = new Helpers.PanelHelper(byteList, face.Name, face.Description, face.UserAccount);
Models.Face tempFace = pHelper.getFace();
//I'm making this object here because otherwise a duplicate is added to the db due to the ID from the other face
Models.Face faceToInsert = new Models.Face
{
Name = face.Name,
Description = tempFace.Description,
TimeAdded = tempFace.TimeAdded,
Approved = tempFace.Approved,
Panels = tempFace.Panels,
UserAccount = tempFace.UserAccount
};
Controllers.LedPanelController.addFace(faceToInsert);
}