12345678910111213141516171819202122232425262728293031 public int[] intarry = {1,2,3,4};/// <summary>/// Host에 해당하는 intarry 값 가져오기/// </summary>protected int GetValue(){int retvalue = ChkHost(Request.Url.Host);return intarry[retvalue];}/// <summary>/// Host 체크하기/// </summary>public int ChkHost(string host){int i = 0;String[] hosts = {"www.a.com","www.b.co.kr","www.c.net","www.d.com"};for (i = 0; i < hosts.Length; i++){if (hosts[i].Equals(host)) break;}return i;}cs
'프로그래밍 노트 > ASP.NET' 카테고리의 다른 글
DataSet에 검색 조건 넣기 (0) | 2015.01.26 |
---|---|
텍스트박스 숫자만 입력되게 설정하는 법 (0) | 2015.01.12 |
동적 배열 생성하는 법 (0) | 2015.01.09 |
사이즈 자동 증가하는 배열 만들기 (0) | 2015.01.08 |
리피터 순번 넣기 (0) | 2015.01.08 |