本文整理汇总了C#中System.Web.UI.WebControls.DetailsView.FindControl方法的典型用法代码示例。如果您正苦于以下问题:C# DetailsView.FindControl方法的具体用法?C# DetailsView.FindControl怎么用?C# DetailsView.FindControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.WebControls.DetailsView
的用法示例。
在下文中一共展示了DetailsView.FindControl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CoalesceBadges
protected string CoalesceBadges(DetailsView dv)
{
var gv = (GridView)dv.FindControl("gvBadgeMembership");
string badgesList= string.Empty;
foreach(GridViewRow row in gv.Rows) {
if(((CheckBox)row.FindControl("isMember")).Checked) {
badgesList = string.Format("{0},{1}", badgesList, ((Label)row.FindControl("BID")).Text);
}
}
if(badgesList.Length > 0)
badgesList = badgesList.Substring(1, badgesList.Length - 1);
return badgesList;
}
示例2: SavePermissions
protected void SavePermissions(DetailsView dv, SRPUser obj) {
GridView gv = (GridView)dv.FindControl("gvUserPermissions");
string groupPermissions= string.Empty;
foreach(GridViewRow row in gv.Rows) {
if(((CheckBox)row.FindControl("isChecked")).Checked) {
groupPermissions = string.Format("{0},{1}", groupPermissions, ((Label)row.FindControl("PermissionID")).Text);
}
}
if(groupPermissions.Length > 0)
groupPermissions = groupPermissions.Substring(1, groupPermissions.Length - 1);
SRPUser.UpdatePermissions((int)obj.Uid, groupPermissions, ((SRPUser)Session[SessionData.UserProfile.ToString()]).Username);
}
示例3: SaveGroups
protected void SaveGroups(DetailsView dv, SRPUser obj) {
GridView gv = (GridView)dv.FindControl("gvUserGroups");
string memberGroups= string.Empty;
foreach(GridViewRow row in gv.Rows) {
if(((CheckBox)row.FindControl("isMember")).Checked) {
memberGroups = string.Format("{0},{1}", memberGroups, ((Label)row.FindControl("GID")).Text);
}
}
if(memberGroups.Length > 0)
memberGroups = memberGroups.Substring(1, memberGroups.Length - 1);
SRPUser.UpdateMemberGroups((int)obj.Uid, memberGroups, ((SRPUser)Session[SessionData.UserProfile.ToString()]).Username);
}