Encoding encKor = Encoding.GetEncoding("ks_c_5601-1987");
Console.WriteLine(encKor.GetByteCount(inString));
ASP .Net web page:
- Dim strClientIP As String
- strClientIP = Request.UserHostAddress()
- Response.Write(strClientIP)
- Context.Request.ServerVariables ["REMOTE_ADDR"]
http://www.webresourcesdepot.com/dnspinger/
구조설명:
컨텐츠 페이지 구조
<div class="wrdLatest" id=1>content</div>
<div class="wrdLatest" id=2>content</div>
<div id="lastPostsLoader"></div>
로딩중 이미지 보여주는 부분과 실제 데이터 가져오는 부분
function lastPostFunc()
{
$('div#lastPostsLoader').html('<img src="bigLoader.gif">');
$.post("scroll.asp?action=getLastPosts&lastID=" + $(".wrdLatest:last").attr("id"),
function(data){
if (data != "") {
$(".wrdLatest:last").after(data);
}
$('div#lastPostsLoader').empty();
});
};
스크롤 감지하는 부분
$(window).scroll(function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()){
lastPostFunc();
}
});
string StrDate0, StrDate1, StrDate2, StrDayOfWeek, StrTime0, StrTime1, StrTime2;
DateTime CurDate = DateTime.Now;
StrDate0 = CurDate.Year.ToString("0000") +
CurDate.Month.ToString("00") +
CurDate.Day.ToString("00");
StrDate1 = CurDate.ToShortDateString();
StrDate2 = CurDate.ToLongDateString();
StrDate0 = CurDate.Hour.ToString("00") +
CurDate.Minute.ToString("00") +
CurDate.Second.ToString("00");
StrTime1 = CurDate.ToShortDateString();
StrTime2 = CurDate.ToLongDateString();
StrDayOfWeek = CurDate.DayOfWeek.ToString();
DayOfWeek StrDayofWeek1 = CurDate.DayOfWeek;int StrDayofWeek2 = (int)CurDate.DayOfWeek;
<html>
<head>
<title></title>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script language=JavaScript>
//전체 선택/해제
function selectAll(){
var c = $('#checkAll').attr('checked');
$('input[name=chkid]').attr('checked',c);
}
//선택된 값 보기
function getSelectVal(){
var idlist = [];
var itemstr ="";
$('input[name=chkid]:checked').each(function(){idlist.push(this.value)});
$.each(idlist,function(index, item){
itemstr += item + ',';
});
$('#resultID').text(itemstr);
}
</script>
</head>
<body>
<input type="checkbox" id="checkAll" class="chk" onclick="selectAll()" /> 전체선택<P/>
<input type="checkbox" name="chkid" value="1" class="chk" />1<P/>
<input type="checkbox" name="chkid" value="2" class="chk" />2<P/>
<input type="checkbox" name="chkid" value="3" class="chk" />3<P/>
<input type="checkbox" name="chkid" value="4" class="chk" />4<P/>
<input type="checkbox" name="chkid" value="5" class="chk" />5<P/>
<input type="checkbox" name="chkid" value="6" class="chk" />6<P/>
<input type="checkbox" name="chkid" value="7" class="chk" />7<P/>
<input type="button" id="showval" onclick="getSelectVal()" value="선택값 보기" />
당신이 선택하신 값은<span id="resultID"></span> 입니다.
</body>
</html>
[출처] [jQuery]checkbox 전체 선택|작성자 빽사장님