티스토리 뷰
Repeater 에서 Header / Footer 템플릿 아이템 찾기 (리피터 FindContorl)
To find a control in the header:
lblControl = repeater1.Controls[0].Controls[0].FindControl("lblControl");
To find a control in the footer:
lblControl = repeater1.Controls[repeater1.Controls.Count - 1].Controls[0].FindControl("lblControl");
With extension methods
public static class RepeaterExtensionMethods
{
public static Control FindControlInHeader(this Repeater repeater, string controlName)
{
return repeater.Controls[0].Controls[0].FindControl(controlName);
}
public static Control FindControlInFooter(this Repeater repeater, string controlName)
{
return repeater.Controls[repeater.Controls.Count - 1].Controls[0].FindControl(controlName);
}
}
'프로그래밍 > ASP.NET' 카테고리의 다른 글
| 브라우저캐시지우기, Cache delete (0) | 2012.04.25 |
|---|---|
| Repeater Cell meage [ 리피터 셀병합 rowspan] (0) | 2012.04.25 |
| Repeater 리피터에 라디오버튼을 넣었을때 중복체크 안되게 하는법 (0) | 2012.04.25 |
| window.open & showModalDialog 창에서 버튼 누르면 계속 새창뜰때 해결방법 (0) | 2012.04.25 |
| ASP.NET 에서 자바스크립트 사용하는 방법 (0) | 2012.04.23 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- jQuery Mobile
- drag&drop
- html5
- 자바스크립트
- Chart
- jQuery
- workbook
- 셀렉터
- Ajax
- json
- JavaScript
- JS
- grid
- Mobile
- 제이쿼리
- radius
- IE
- ASP.NET
- CSS
- jquery chart
- css3
- 프로시저
- 저장프로시저
- rowspan
- Excel
- WebApi
- SVG
- MSSQL
- WCF
- Style
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
글 보관함