1. FullCalendar

FullCalendar is a famous jQuery calendar plugin which offers features like drag-and-drop, integration with Google Calendar and able to fetch events through JSON. Designers can easily customize the look and feel of the calendar, while developers can utilize the exposed hooks for user-triggered events.
FullCalendar

2. Astonishing iCal-like Calendar

This is a tutorial which uses both jQuery and CSS to build an iPhone styled calendar application. The author also implement the Coda-like effect for the popup event.
Astonishing iCal-like Calendar

3. jQuery UI Datepicker

The jQuery UI Datepicker is a highly configurable plugin that adds date picker functionality to your pages. You can customize the date format and language, restrict the selectable date ranges and add in buttons and other navigation options easily.
jQuery UI Datepicker

4. jMonthCalendar

jMonthCalendar supports full month calendar and events. The interesting part of this plugin is it allows developers to interact with the calendar.
jMonthCalendar

5. Date Picker

Date Picker is a jQuery calendar plugin released under MIT and GPL licenses. It has a lot of options and features. For example, you can have multiple calendars in the component, mark dates as special days, easy to customize through CSS and allow different selection modes. All these can be easily setup though the configuration options.
Date Picker

6. jQuery Week Calendar

jQuery Week Calendar is a plugin which will include a weekly calendar in the web application. The events can be supplied as an array or JSON, and these events can be easily drag, drop and resize. There are a lot of options and event callbacks which you can refer through the official plugin page.
jQuery Week Calendar

7. Simple jQuery Date-picker Plugin

This is a very simple date picker plugin. However, it provides a lot of useful and necessary features for a date picker. For example, you can easily navigate to the months and years through the drop down selection boxes.
Simple jQuery Date-picker Plugin

8. jQuery Date Picker Plugin

This is an clean, unobtrusive plugin for jQuery which allows you to easily add date picker to your web forms and pages. There are a lot of configurations and options for this simple plugin. You can refer to the plugin page for more examples of how to use this plugin.
jQuery Date Picker Plugin

9. jQuery Interactive Date Range Picker

This powerful date range picker is a modified version of jQuery UI’s Datepicker component. It has a quicker date selection from a list of preset dates/ranges and a smooth transitions. The latest version uses the jQuery UI 1.7 and jQuery UI CSS Framework. With the power of jQuery UI, user can now switch the calendar theme easily.
jQuery Interactive Date Range Picker


//================================================
// 메일 발송전 폼 체크
// 2009-11-06
// kdonghwa
//================================================
function formCheck() {
    if (jQuery('#fromMail').val().length == 0) {
        alert('발송 메일 주소를 적어주세요');
        jQuery('#fromMail').focus();
        return false;
    }
    if (jQuery('#title').val().length == 0) {
        alert('메일 제목을 적어주세요');
        jQuery('#title').focus();
        return false;
    }
    if (jQuery('#content').val().length == 0) {
        alert('메일 내용을 적어주세요');
        jQuery('#content').focus();
        return false;
    }
    return true;
}

//================================================
// 메일 발송Ajax
// 2009-11-06
// kdonghwa
//================================================
function sendMail() {
    var options = {
        beforeSubmit: formCheck,
        success: responseCtl,
        url: "/url.do",
        contentType: "application/x-www-form-urlencoded;charset=UTF-8",
        type: "post", /* get, post */
        dataType: "html" /* xml, html, script, json */
    };
    jQuery("#fmMailInfo").ajaxSubmit(options);
}

//================================================
// 메일 발송결과 처리
// 2009-11-06
// kdonghwa
//================================================
function responseCtl(html, status) {
    if (status == 'success') {
        alert('메일을 발송하였습니다.');
        self.close();
    }
    else {
        alert('메일 발송에 실패하였습니다!');
    }
}



 jQuery(document).ready(function() {
         //=========================================================
         // 체크 박스 클릭시 전체 선택 or 전체 선택 해제
         //=========================================================
         jQuery("#check_all").click(function() {
                if (jQuery("#check_all:checked").length > 0) {
                     jQuery('input:checkbox[name=userCheck]:not(checked)').attr("checked", "checked");
                } else {
                    jQuery('input:checkbox[name=userCheck]:checked').attr("checked", "");
                }
         });
 });


public class CheckExeTime : IHttpModule
{
    public string ModuleName // Module Name Define
    {
        get { return "CheckTime"; }
    }

    private DateTime startTime;

    public void Init(HttpApplication application)  // IhttpModule 인터페이스 구현
    {
        application.BeginRequest += new EventHandler(application_BeginRequest);
        application.EndRequest += new EventHandler(application_EndRequest);
    }
    public void Dispose() // IhttpModule 인터페이스 구현
    {
    }
    public void application_BeginRequest(object source, EventArgs e)
    {
        startTime = DateTime.Now; // 요청 시간 Check
    }

    public void application_EndRequest(object source, EventArgs e)
    {
        //현재의 HttpApplication 개체를 얻어온다
        HttpApplication app = (HttpApplication)source;
        //현재 웹 어플리케이션의 컨텍스트를 얻어온다
        HttpContext context = app.Context;

        string pageID = context.Request.CurrentExecutionFilePath.ToString(); // 요청한 PageID (*.aspx)
        string requestIP = context.Request.UserHostAddress; // 요청한 Client IP

        TimeSpan span = DateTime.Now - startTime;

        // TO DO : 출력형식을 자유롭게 코딩하면 됨(텍스트파일로 쓰기 / DB에 저장)

        context.Response.Write("");
    }
}

위 소스를 작성한 후 아래 구문을 web.config에 추가하면 asp.net 페이지가 동작을 하면 실행이 된다.

[IIS 6.0 및 IIS 7.0 기본 모드에서 HTTP 모듈 등록]


    
        
    



[통합 모드의 IIS 7.0에서 HTTP 모듈 등록]

    
        
    


 

여러 언어를 지원해야 하는 다국어 웹 사이트를 구축하기 위한 방법을 알아보자.

 

제일 쉬운 접근 방법은 각 언어에 해당하는 웹 사이트를 별도로 만드는 것이다.

그러나 이것은 접근 방법이 쉽다는 것 뿐, 개발 양적인 측면이나 유지/보수성을 생각한다면 결코 좋은 접근 방법이 아닐 것이다.

동일한 컨셉과 구조, 컨텐츠를 제공하는 웹 사이트가 단지 언어만 다르다는 이유로 쌍둥이 사이트를 새로 개발해야 한다는 문제점과

그렇게 구축된 웹 사이트의 특정 컨텐츠 추가나 변경을 해야 할 때에는 모든 웹 사이트를 다 수정해야 하는 문제점이 있다.

 

예전부터 효율적인 다국어 지원을 위해서 다양한 방법들이 개발자들에 의해 구현되어 왔었는데..

가장 보편적으로는 다국어 처리를 위한 일종의 유틸리티 성 모듈을 거쳐 처리하는 방식이 대부분 이었다.

 

이번 글에서는 닷넷이 제공하는 표준 리소스 메커니즘을 이용해 다국어 지원을 효율적으로 하는 방법을 알아 본다.

 

ASP.NET 1.x 2.0 모두 리소스를 이용할 수 있다.

닷넷의 리소스에 대한 개념은 다음 글에서 확인해 주길 바란다.

리소스(Resource)

 

ASP.NET 1.1 에서는 리소스를 이용한 다국어처리를 위해 ResourceManager 를 이용했었다.

그러나 ASP.NET 2.0에서는 보다 관리용이하고 개발용이 하도록 개선된 부분이 있다.

 

 

전역(Global) 리소스 파일 / 지역(Local) 리소스 파일

ASP.NET 2.0 에서는 리소스 파일의 사용 범위에 따라 전역,지역 두 가지로 분리되었다.

App_Code App_Data 처럼 리소스 파일 역시 예약된 폴더를 가지고 있다.

 

전역 리소스 파일 저장 -> App_GlobalResources

지역 리소스 파일 저장 -> App_LocalResources

 

전역 리소스는 말 그대로 웹 사이트 모든 영역에서 사용할 수 있으나

지역 리소스는 특정 단일 페이지(aspx, ascx, master) 에서만 사용가능하다.

또한 당연하겠지만 App_GlobalResources 폴더는 웹 사이트 루트에 단 1 개만 허용되지만 App_LocalResources 폴더는

웹 사이트 내의 모든 폴더에 하나 씩 존재해도 된다.

 

 

Web.Config 에 언어정보 추가하기.

언어 설정에 따른 지역화를 테스트 하기 위해 웹 사이트의 설정 파일인 Web.Config 파일에 다음과 같이 언어 정보를 기록하자.

<globalization uiCulture="en" />

일단 테스트를 위해 현재 UICulture 를 영어(en) 으로 설정하였다.

 

 

* 현재 브라우저에 설정된 기본 언어(첫 번째 언어) 를 참고해서 UICulture 를 지정하려면 ‘auto’ 를 사용하면 된다

<globalization uiCulture="auto" />

또는

<%@ Page UICulture="es" UICulture="auto" %>

 

이렇게 설정 하면 브라우저에 설정된 첫 번째 언어로 설정되게 된다

 

 

 

전역(Global) 리소스 이용하기.

웹 프로젝트에 App_GlobalResources 폴더를 생성하고 다음과 같이 리소스 파일을 생성하자.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

언어 정보가 없는 Resource.resx 기본 리소스 파일이다.

이 리소스 파일은 해당 언어의 리소스 파일이 없을 경우 대체(fallback) 리소스 파일로 사용된다.

이 기본 리소스 파일을 한국어를 위한 리소스 파일로 사용할 것이며 영어를 지원하기 위해서 Resource.en.resx 을 사용한다.

 

리소스 파일명에 포함된 언어 정보는 정확히 기입해야 한다.

런타임에 ASP.NET  에서는 CurrentUICulture 속성과 가장 많이 일치 하는 리소스 파일을 자동으로 찾아서 사용하게 된다.

이때 참조되는 정보가 리소스 파일명이 된다.

 

각 국가별 언어 표현은 아래와 같이 확인할 수 있다.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

이렇게 리소스 파일이 준비 되었으면 컨트롤의 지역화를 수행해 보자.

웹 페이지에 버턴과 Localize 컨트롤을 올리고 Text 속성에 명시적으로 지역화를 수행하도록 한다.

<asp:Button ID="Button1" runat="server"

        Text="<%$ Resources:Resource, Message %>" /><br />

              

<asp:Localize ID="Localize1" runat="server"

        Text="<%$ Resources:Resource, Message %>"></asp:Localize>

 

전역 리소스 파일을 사용할 경우 다음과 같은 표현식으로 리소스 내용을 참조하게 된다.

이를 명시적 지역화라 한다.

<%$ Resource: Class , Key %>

Class 의 경우 확장자와 언어정보를 제외한 리소스 파일명이 된다. 이 예에서는 Resource 가 된다.

Key 는 리소스 파일에 기록한 Key 정보 이다. Key 에 해당하는 Value 를 가져오는 것이 되겠다.

 

Localize 컨트롤은 닷넷 2.0에 새로 추가된 컨트롤로써 Literal 컨트롤을 상속받은 컨트롤이다.

이는 웹 페이지에 고정되고 정적인 내용을 표현하기 위한 가벼운 컨트롤 즈음 될 것이다.

(사실 Literal , Label 컨트롤로도 동일한 지역화를 구현할 수 있다)

 

이렇게 다 구현되었다면 Web.Config <globalization uiCulture="en" /> 내용을 변경하면서 테스트 해 보자.

아래는 en, ko 두 가지를 테스트 해본 결과 이다.

en으로 설정하면 Resource.en.resx 가 사용될 것이며

ko 로 했을 경우에는 Resource.ko.resx 가 없으므로 기본 리소스 파일인 Resource.resx 가 대체되어 사용되었다.

 

또한 다음과 같이 전역 리소스의 내용을 출력할 수 있다.

Response.Write(this.GetGlobalResourceObject("Resource", "Message"));

 

 

지역(Local) 리소스 이용하기.

웹 프로젝트의 원하는 폴더에(웹 루트도 상관없다) App_LocalResources 폴더를 생성하고 다음과 같이 리소스 파일을 생성하자.

이전과 동일하게 기본리소스와 영어지원을 위한 리소스 두 개를 생성하고 내용을 Key-Value 형태로 기록하였다.

 

주의 해야 할 것은 지역(Local) 리소스의 경우 특정 한 페이지만을 위한 리소스 이므로 페이지명과 연결 시켜서 리소스 파일명이 부여되어야 한다.

현재 이 예제에서는 Local.aspx.resx 리소스라는 말은 Local.aspx 라는 페이지를 위한 리소스 파일이 되는 것이다.

또한 닷넷 컨트롤의 속성과 리소스 파일의 Key 이름과도 연관성이 있는데, 이 예제에서는

ButtonResource.Text 라 했으므로 컨트롤의 Text 속성에 이 Key 가 자동으로 사용된다 라고 해석하면 되겠다.

 

일단 지역 리소스파일을 이용해 컨트롤의 지역화를 수행해 보자

<asp:Button ID="Button1" runat="server"

        Text="<%$ Resources: ButtonResource.Text %>" />

또는       

<asp:Button ID="Button2" runat="server" Text="DefaultText2"

        meta:resourcekey="ButtonResource" />

 

지역 리소스를 사용할 경우 전역 리소스처럼 명시적 지역화를 수행할 수도 있지만

Meta 태그를 이용한 암시적 지역화로도 사용가능하다.

암시적 지역화는 앞서 말했듯이 리소스 키 값만 연결해 주면 컨트롤의 특정 속성과 리소스 파일에 속성이 매칭되어 사용되는 것을 말한다.

 

또한 명시적 지역화를 사용할 경우에도 Class 명을 생략할 수 있다. 단일 페이지에 연결된 리소스 파일이기 때문에 굳이 리소스 파일명을

기입할 필요가 없는 것이다.

역시 Web.config 의 언어 정보를 변경하면서 수행하면 다음과 같이 결과가 나온다.

 

 

 

물론 지역(Local) 리소스 파일의 경우에도 다음과 같이 일반 출력이 가능하다

Response.Write(this.GetLocalResourceObject("ButtonResource.Text"));

 

 

전역(Global) 리소스 와 지역(Local) 리소스의 적용 상황

닷넷 프레임워크에서는 지역화를 위한 단일한 접근이 아니라 범위에 따른 두 개의 영역으로 리소스 파일을 관리하도록 하였다.

이 둘 중 어느것을 사용할 지에 대한 기준은 프로젝트의 성격에 따라 다르겠지만

일반적으로 다음과 같은 가이드 라인을 제공할 수 가 있겠다.

1)       공용 메시지나 단순 출력 메시지일 경우 전역 리소스 사용

2)       웹 사이트에 전역적으로 사용되는 메시지일 경우 전역 리소스 사용

3)       전역 리소스 파일이 너무 커져 협업의 어려움이나 관리의 어려움이 있을 경우 지역 리소스 사용
-
웹 사이트의 모든 페이지의 리소스를 하나의 전역 리소스에 다 표현한다면 파일을 관리하기도 어려울 것이며,
 
협업 시 발생하는 파일 동시 변경과 같은 문제점도 발생할 수 있다.
 
로컬 리소스를 사용하면 각 폴더마다 리소스 폴더를 별도로 둘 수 있으며 각 페이지에 해당하는 리소스 파일을 각각 생성함으로써
 
협업 시 서로 신경 쓰지 않고 작업할 수 있으며 페이지 별로 리소스를 관리하기 때문에 파일에 대한 관리도 용이해 질 수 있다.

4)       각 페이지의 컨트롤의 텍스트 표현(Text 속성)을 위해서는 지역 리소스 사용
- 3)
의 이유와도 동일함.
 
모든 페이지의 컨트롤 Text 속성을 단 하나의 전역 리소스에 포함해야 한다면.. 끔찍할 것이다.

 

이상의 가이드 라인을 기준으로 현재 프로젝트에 적합한 리소스 파일을 사용하기 바란다.

 

 

리소스를 이용한 웹 페이지 지역화에 대해 보다 상세한 내용은 다음의 MSDN 을 참고하기 바란다.

http://msdn2.microsoft.com/ko-kr/library/ms227427(VS.80).aspx

 

 

 

 

* 참고

아래 이미지를 보자

 

이와 같이 텍스트를 포함하는 이미지일 경우에도 다국어 처리를 해 주어야 한다.

여러 방법이 있을 수 있으나,

통상적으로 각 언어별로 이미지를 새로 만들어 폴더를 구분하는 방법이 있다.

이 경우에도 리소스 파일과 연계하여 사용하면 그나마 유연한 환경이 될 것이라 본다.

아래처럼 각 언어별 리소스 파일에 이미지의 경로를 기록하는 것이다.

 

 

 

 

 

 

그리고 아래와 같이 현재 UICulture 에 맞는 리소스의 경로를 참조하도록 한다.

<asp:Image ID="Image1" runat="server" ImageUrl="<%$ Resources:Resource, ImageUrl %>" />

또는       

<img src="<%$ Resources:Resource, ImageUrl %>" runat=server />

 

물론 웹 사이트의 모든 이미지를 서버 컨트롤로 만드는 것이 결코 좋은 선택은 아니다.

닷넷의 서버 컨트롤은 필요하다면 최소화 하는 것이 수행 속도 면에서는 좋을 수 있다.

 

여기서 말하는 이미지 다국어 처리 방법은 리소스와 연계한 힌트 성 글이니 이 글을 절대적으로 수용할 필요도 없으며

적합하지 않을 가능성이 크다.  그래서 참고인 것이다 ^^;

 


iframe이 로딩될 때 현재 프레임의 스크롤바값을 가져와서 창크기 자동 조절 스크립트입니다.


[샘플 코드]
<script language="javascript">
    function ResizeIframe(frm)
    {
        frm.setExpression('width', ifrmTest.document.body.scrollWidth);
        frm.setExpression('height', ifrmTest.document.body.scrollHeight);
    }
</script>


<body>
    <iframe id="ifrmTest" src="Test.aspx" name="test" marginwidth="0"marginheight="0" topmargin="0" scrolling="no"
             frameborder="0" ALLOWTRANSPARENCY="true" onload="javscript:ResizeIframe(this);">
    </iframe>
</body>

 

기본적으로는 서버와 클라이언트 코드는 서로를 직접적으로 호출 할 수 없다. 서로 실행되는 시간과 위치가 다르기 때문이다.

서버코드 : Requeset를 받았을때 서버에서 실행

클라이언트코드 : Response를 받은 클라이언트 브라우저에서 실행

 

하지만, 이를 가능하게 하는 몇가지 방법이 있고, 매번 기억하기 어려워서 여기에 정리해본다.

뭐 고급유저라면 관련 Tip을 상당히 여러가지 알고 있겠지만, 그래도 모든걸 항상 기억하긴 여러우니까...

<작성: http://blog.naver.com/myfancy>

 

1. ASP.NET AJAX - Web Service 호출

스크립트에서 Web Service 컨테이너에서 노출하고 있는 함수를 AJAX로 호출하는 방법이다. 포스트백이나 페이지 리프레시가 발생하지 않는다. 하지만, 비교적 많은 이해가 필요하고, .asmx로 웹서비스를 별도로 만들어야만 된다.

참고) Client-Side Web Service Call with AJAX Extentions

         http://msdn.microsoft.com/en-us/magazine/cc163499.aspx

        Calling Web Servivce from Client Script

         http://msdn.microsoft.com/en-us/library/bb398995.aspx

         http://msdn.microsoft.com/ko-kr/library/bb398998.aspx

 

2. ASP.NET Ajax Extentions - PageMethod 호출

PageMethod는 기본적으로 Page의 Behind코드에 public static으로 노출하고, JavaScript에서 호출하는 방식이다. PageMethod는 [WebMethod]라고 함수에 꾸며주기만 하면되고, Response에 Inline JavaScript Proxy 코드가 생성된다.

 

[System.Web.Services.WebMethod]
public static string GetContactName(string custid){}
함수는 반드시 public static이여야 한다.
 

<asp:ScriptManager ... EnablePageMethods=”true”/>

이 기법을 사용하기 위해서는 ScriptManager에 EnablePageMethods속성을 true로 설정하면 된다.

 

function CallGetContactName(custid,cbParam)
{    
 // call server side method
 PageMethods.GetContactName(custid,OnSuccess,OnFailed,cbParam);
}
// set the destination textbox value with the ContactName
function OnSuccess(res, cbParam)
{    
 //결과값 : res, 콜백파라미터:cbParam
}
// alert message on some failure
function OnFailed(res, cbParam)
{
 //결과값 : res, 콜백파라미터:cbParam
 alert(res.get_message());
}
스크립트를 별도의 파일로 추가할 경우 <head/>섹션이 아닌 <body>태그 아래 추가해야 한다.

3. jQuery를 이용한 WebService 호출

http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/

http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/

http://encosia.com/2008/06/05/3-mistakes-to-avoid-when-using-jquery-with-aspnet-ajax/

 

4. Get, Post를 이용한 방법 (Non Ajax)

ASP.NET의 Page, HttpHandler, HttpModule등을 이용하여 Request를 받아 Response를 주는 인스턴스를 만들어 놓고, 순수 Ajax나, Post등의 기법을 이용하여 처리 할 수 있다.


body 부분에 아래와 같이 선언해주면 된다.

<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">

 oncontextmenu="return false"   오른쪽마우스버튼막기
 onselectstart="return false"   텍스트 선택막기
 ondragstart="return false"  드래그막기


By default, debugging a website or web project within Visual Studio bring up the built-in server of Visual Studio. But, we do have a problem to change the server to an IIS instance. I recently switched to debugging on IIS on my Windows 2008 Server Machine. Debugging works fine. The only problem is that if your code hit some breakpoint and if you leave the program in ‘break’ mode for more than 90 seconds, Visual Studio shows the following message:



After a bit tweaking around in the new IIS interface, I got the solution:

  1. Open Internet Information Services (IIS) Manager.
  2. From the server tree (the item with the name as the server name), choose Application Pools.
  3. Choose the Application Pool corresponding to your testing IIS website (usually it has the same name as your IIS website)
  4. Right-click and choose Advanced Settings.
  5. From the Process Model node, change the Ping Maximum Response Time (seconds) to a comfortably higher value (I have set the value to 900 seconds which is 15 minutes).


Alternatively, you can also set the Ping Enabled property to False.

Apparently what happens is that the server keeps pinging the worker process and waits for a response. When in debugging mode, the worker process is affectively suspended, which results in the ping not being responded.

IE 버젼별 UI 테스트 툴입니다.

 http://www.my-debugbar.com/wiki/IETester/HomePage

I have been asked to provide some MIME for 2003 servers so we thought it was best to provide a fairly complete list.
The following MIME extensions can be added to IIS on Windows 2003

MIME Maps Extension Type

.323 text/h323
.3gp audio/3gpp
.3gp video/3gpp
.IVF video/x-ivf
.Mtx Application/metastream
.aaf application/octet-stream
.aca application/octet-stream
.ace application/x-compressed
.acx application/internet-property-stream
.aer Application/atmosphere
.afm application/octet-stream
.ai application/postscript
.aif audio/x-aiff
.aifc audio/aiff
.aiff audio/aiff
.application application/x-ms-application
.art image/x-jg
.as text/plain
.asd application/octet-stream
.asf video/x-ms-asf
.asi application/octet-stream
.asm text/plain
.asr video/x-ms-asf
.asx video/x-ms-asf
.au audio/basic
.avi video/x-msvideo
.axs application/olescript
.bas text/plain
.bcpio application/x-bcpio
.bin application/octet-stream
.bmp image/bmp
.c text/plain
.cab application/octet-stream
.cat application/vnd.ms-pki.seccat
.cdf application/x-cdf
.cfg 3DVista CFG
.chm application/octet-stream
.class application/x-java-applet
.clp application/x-msclip
.cmx image/x-cmx
.cnf text/plain
.co application/x-cult3d-object
.cod image/cis-cod
.cpio application/x-cpio
.cpp text/plain
.crd application/x-mscardfile
.crl application/pkix-crl
.crt application/x-x509-ca-cert
.csh application/x-csh
.css text/css
.csv application/octet-stream
.cur application/octet-stream
.dcr application/x-director
.deploy application/octet-stream
.der application/x-x509-ca-cert
.dib image/bmp
.dir application/x-director
.disco text/xml
.djv Image/x.djvu
.djvu Image/x.djvu
.dll application/x-msdownload
.dlm text/dlm
.dnl application/x-msdownload
.doc application/msword
.dot application/msword
.dsp application/octet-stream
.dtd text/xml
.dvi application/x-dvi
.dwf drawing/x-dwf
.dwg image/x-dwg
.dwp application/octet-stream
.dxr application/x-director
.eml message/rfc822
.emz application/octet-stream
.eot application/octet-stream
.eps application/postscript
.etx text/x-setext
.evy application/envoy
.exe application/octet-stream
.fdf application/vnd.fdf
.fif application/fractals
.fla application/octet-stream
.flr x-world/x-vrml
.flv application/x-shockwave-flash
.gif image/gif
.gtar application/x-gtar
.gz application/x-gzip
.h text/plain
.hdf application/x-hdf
.hdml text/x-hdml
.hhc application/x-oleobject
.hhk application/octet-stream
.hhp application/octet-stream
.hlp application/winhlp
.hqx application/mac-binhex40
.hta application/hta
.htc text/x-component
.htm text/html
.html text/html
.htt text/webviewhtml
.hxt text/html
.ico image/x-icon
.ics application/octet-stream
.ief image/ief
.iii application/x-iphone
.inf application/octet-stream
.ins application/x-internet-signup
.ips application/x-ipscript
.ipx application/x-ipix
.isp application/x-internet-signup
.ivr i-world/i-vrml
.jad text/vnd.sun.j2me.app-descriptor
.jar application/java-archive
.java application/octet-stream
.jck application/liquidmotion
.jcz application/liquidmotion
.jfif image/pjpeg
.jpb application/octet-stream
.jpe image/jpeg
.jpeg image/jpeg
.jpg image/jpeg
.js application/x-javascript
.kml Application/vnd.google-earth.kml+xml
.kmz Application/vnd.google-earth.kmz
.latex application/x-latex
.lit application/x-ms-reader
.lpk application/octet-stream
.lsf video/x-la-asf
.lsx video/x-la-asf
.lzh application/octet-stream
.m13 application/x-msmediaview
.m14 application/x-msmediaview
.m1v video/mpeg
.m3u audio/x-mpegurl
.man application/x-troff-man
.manifest application/x-ms-manifest
.map text/plain
.mdb application/x-msaccess
.mdp application/octet-stream
.me application/x-troff-me
.mht message/rfc822
.mhtml message/rfc822
.mid audio/mid
.midi audio/mid
.mix application/octet-stream
.mmf application/x-smaf
.mno text/xml
.mny application/x-msmoney
.mov video/quicktime
.movie video/x-sgi-movie
.mp2 video/mpeg
.mp3 audio/mpeg
.mp4 Video/mp4
.mp4 video/mp4
.mpa video/mpeg
.mpe video/mpeg
.mpeg video/mpeg
.mpg video/mpeg
.mpp application/vnd.ms-project
.mpv2 video/mpeg
.ms application/x-troff-ms
.msi application/octet-stream
.mts Application/metastream
.mvb application/x-msmediaview
.mw2 Image/x.mw2
.mwx Image/x.mwx
.nc application/x-netcdf
.nsc video/x-ms-asf
.nws message/rfc822
.ocx application/octet-stream
.oda application/oda
.ods application/oleobject
.odt application/vnd.oasis.opendocument.text
.p10 application/pkcs10
.p12 application/x-pkcs12
.p7b application/x-pkcs7-certificates
.p7c application/pkcs7-mime
.p7m application/pkcs7-mime
.p7r application/x-pkcs7-certreqresp
.p7s application/pkcs7-signature
.pbm image/x-portable-bitmap
.pcx application/octet-stream
.pcz application/octet-stream
.pdf application/pdf
.pfb application/octet-stream
.pfm application/octet-stream
.pfx application/x-pkcs12
.pgm image/x-portable-graymap
.pko application/vnd.ms-pki.pko
.pma application/x-perfmon
.pmc application/x-perfmon
.pml application/x-perfmon
.pmr application/x-perfmon
.pmw application/x-perfmon
.png image/png
.pnm image/x-portable-anymap
.pnz image/png
.pot application/vnd.ms-powerpoint
.ppm image/x-portable-pixmap
.pps application/vnd.ms-powerpoint
.ppt application/vnd.ms-powerpoint
.prf application/pics-rules
.prm application/octet-stream
.prx application/octet-stream
.ps application/postscript
.psd application/octet-stream
.psm application/octet-stream
.psp application/octet-stream
.pub application/x-mspublisher
.qt video/quicktime
.qtl application/x-quicktimeplayer
.qxd application/octet-stream
.ra audio/x-pn-realaudio
.ram audio/x-pn-realaudio
.rar application/octet-stream
.ras image/x-cmu-raster
.rba 3DVista Audio
.rdf application/xml
.rf image/vnd.rn-realflash
.rgb image/x-rgb
.rm application/vnd.rn-realmedia
.rmi audio/mid
.rmvb application/vnd.rn-realmedia-vbr
.roff application/x-troff
.rpm audio/x-pn-realaudio-plugin
.rtf application/rtf
.rtx text/richtext
.scd application/x-msschedule
.sct text/scriptlet
.sea application/octet-stream
.setpay application/set-payment-initiation
.setreg application/set-registration-initiation
.sgml text/sgml
.sh application/x-sh
.shar application/x-shar
.sit application/x-stuffit
.ski 3DVista SKI
.skz 3DVista SKZ
.smd audio/x-smd
.smi application/octet-stream
.smx audio/x-smd
.smz audio/x-smd
.snd audio/basic
.snp application/octet-stream
.spc application/x-pkcs7-certificates
.spl application/futuresplash
.src application/x-wais-source
.ssm application/streamingmedia
.sst application/vnd.ms-pki.certstore
.stl application/vnd.ms-pki.stl
.sv4cpio application/x-sv4cpio
.sv4crc application/x-sv4crc
.svg image/svg+xml
.svg2 image/svg+xml
.svgz image/svg+xml
.swf application/x-shockwave-flash
.t application/x-troff
.tar application/x-tar
.tcl application/x-tcl
.tex application/x-tex
.texi application/x-texinfo
.texinfo application/x-texinfo
.tgz application/x-compressed
.thn application/octet-stream
.tif image/tiff
.tiff image/tiff
.toc application/octet-stream
.tr application/x-troff
.trm application/x-msterminal
.tsv text/tab-separated-values
.ttf application/octet-stream
.txt text/plain
.u32 application/octet-stream
.uls text/iuls
.ustar application/x-ustar
.utx Text/xml
.vbs text/vbscript
.vcf text/x-vcard
.vcs text/plain
.vdx application/vnd.visio
.vml text/xml
.vsd application/vnd.visio
.vss application/vnd.visio
.vst application/vnd.visio
.vsw application/vnd.visio
.vsx application/vnd.visio
.vtx application/vnd.visio
.wav audio/wav
.wax audio/x-ms-wax
.wbmp image/vnd.wap.wbmp
.wcm application/vnd.ms-works
.wdb application/vnd.ms-works
.wks application/vnd.ms-works
.wm video/x-ms-wm
.wma audio/x-ms-wma
.wmd application/x-ms-wmd
.wmf application/x-msmetafile
.wml text/vnd.wap.wml
.wmlc application/vnd.wap.wmlc
.wmls text/vnd.wap.wmlscript
.wmlsc application/vnd.wap.wmlscriptc
.wmp video/x-ms-wmp
.wmv video/x-ms-wmv
.wmx video/x-ms-wmx
.wmz application/x-ms-wmz
.wps application/vnd.ms-works
.wri application/x-mswrite
.wrl x-world/x-vrml
.wrz x-world/x-vrml
.wsdl text/xml
.wvx video/x-ms-wvx
.x application/directx
.xaf x-world/x-vrml
.xbm image/x-xbitmap
.xdr text/plain
.xla application/vnd.ms-excel
.xlc application/vnd.ms-excel
.xlm application/vnd.ms-excel
.xls application/vnd.ms-excel
.xlt application/vnd.ms-excel
.xlw application/vnd.ms-excel
.xml text/xml
.xof x-world/x-vrml
.xpm image/x-xpixmap
.xsd text/xml
.xsf text/xml
.xsl text/xml
.xslt text/xml
.xsn application/octet-stream
.xwd image/x-xwindowdump
.z application/x-compress
.zip application/x-zip-compressed


웹 개발 중, 브라우저 크기에 따라 텍스트 길이가 길어질 경우가 있다.
그럴 경우 자동으로 "..." 처리 하는 방법이 있는데,
누구나 아는 방법이겠지만, 간단하게 설명하겠다.

table 태그 내에 style="TABLE-layout:fixed;"
td 태그 내에 nobr태그가 있을 경우 자동으로 ... 처리가 가능하다.

<HTML>
<HEAD>
<STYLE>
.longcut  { text-overflow : ellipsis;overflow : hidden; }
</STYLE>
</HEAD>
<TABLE style="TABLE-LAYOUT: fixed" border=1 width="100%"><TR><TD class=longcut><NOBR>안녕하세요 영어 숫자 아아앙 adfdfdd 1234 45777 아라앙아아앙아앙 1259800</NOBR></TD></TR><TR><TD class=longcut><NOBR>익스플로러 창 사이즈를 늘였다 줄였다 해보세요.<NOBR></NOBR></TD></TR>
</TABLE>

</HTML>

II 6.0 까지는
web.config에서
<httpRuntime executionTimeout="18000" maxRequestLength="2000000"/>
태그만 설정해주면 되었는데요.

IIS 7.0에서는 좀 추가 작업이 필요하네요.

<system.webServer>
  <security>
      <requestFiltering>
         <requestLimits maxAllowedContentLength="2147483648"/>
      </requestFiltering>
   </security>
</system.webServer>

그런데 컴퓨터에 따라
이 설정 적용 후 페이지를 띄우면 이런 메세지가 뜹니다.

이 아래와 같은 메세지가 뜨면
C:\Windows\System32\inetsrv\config\applicationHost.config
파일의 <section name="requestFiltering" overrideModeDefault="Deny" />를
<section name="requestFiltering" overrideModeDefault="Allow" />
로 변경해 주시면 됩니다.

* 이 적용을 web.config에서도 할수도 있는데요. 제가 아직 그 부분은 해보질 않아서...
   ^^;; 아시는 분은 좀 가르쳐 주세요.


HTTP 오류 500.19 - Internal Server Error
요청된 페이지와 관련된 구성 데이터가 잘못되어 해당 페이지에 액세스할 수 없습니다.

이 구성 섹션은 이 경로에서 사용할 수 없습니다. 섹션이 부모 수준에서 잠겨 있는 경우 이 오류가 발생합니다. 이러한 잠금은 기본적으로 설정(overrideModeDefault="Deny")되거나 overrideMode="Deny" 또는 레거시 allowOverride="false"와 함께 위치 태그를 사용하여 명시적으로 설정합니다.


ASP.NET에서 MS-SQL을 사용할 경우, SQLClient 라는 전용 공급자(Provider)를 사용한다.
Oracle에서는 OleDb방식을 사용하여야 하는데 .NET에서 오라클 전용 공급자(Provider)를 제공해주고 있다.

MS-SQL 연결방법과 큰차이는 없지만 데이터 공급자가 다를 뿐이다.
아래는 오라클 전용 공급자(Provider)를 사용하여 Oracle에 연결하는 간단한 소스이다.

1. 참조추가에 System.Data.OracleClient 를 추가한다.
2. Using System.Data.OracleClient 선언한다.
3. OracleProvider 이용하여 코딩한다.
  string service_name = @"
                            (DESCRIPTION =
                                (ADDRESS_LIST =
                                  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
                                )
                                (CONNECT_DATA =
                                  (SERVICE_NAME = database_name)
                                )
                              )";
       
string sqlString = "SELECT EMP_NO, EMP_NM FROM TBM_EMP";

DataSet ds = new DataSet();
OracleConnection Oracleconn =  
                 New OracleConnection("Data Source=" + service_name + ";User=CALLSM;Password=CALLSM");

Oracleconn.Open();
OracleDataAdapter OrcleAd = new OracleDataAdapter(sqlString, Oracleconn);

Oracleconn.Close();
OrcleAd.Fill(ds);

GridView1.DataSource = ds;
GridView1.DataBind();

ASP.NET

·         Extending the GridView to Include Sort Arrows: Scott Mitchell has a nice article that describes how to add a visual indicator to the GridView control to indicate the current sort order on columns.

·         Using ASP.NET 3.5's ListView and DataPager Controls: Sorting Data: Scott Mitchell continues his ListView control series with a good article on enabling sorting scenarios with the new ListView control.

·         Building a Grouping Grid with the ListView and LinqDataSource Controls: Matt Berseth has an awesome post that shows off using the new ListView control and LinqDataSource controls to build a hierarchical grouping grid.  A post to bookmark.

·         Using the ListView, DataPager and LinqDataSource Controls: Matt Berseth has a good tutorial post that shows off using these new controls to join data from two database tables using LINQ.

·         Some ASP.NET 3.5 ListView Control Examples: Mike Ormond has a nice post that provides a number of samples that show how to use the new ASP.NET ListView control.  For even more ListView articles, check out my last link-listing post which pointed to a bunch of them.

·         Large File Uploads in ASP.NET: Jon Galloway has a nice post that provides some good details on handing large file uploads using ASP.NET.

ASP.NET AJAX

·         Four ASP.NET AJAX JavaScript UI Methods You Should Learn: Dave Ward has another great post in his series about ASP.NET AJAX's client-side JavaScript Helper Methods.

·         Five Tab Themes Created for the ASP.NET AJAX Control Toolkit: Matt Berseth posts some really cool themes created for the ASP.NET AJAX Control Toolkit's Tab control. Very slick!

·         CNN Style Scrolling Ticker with the Marquee Toolkit Control: Matt Berseth posts another great one that shows how to implement a scrolling marquee UI using the ASP.NET AJAX Control Toolkit.

Visual Studio

·         Did You Know?: Lisa Feigenbaum from the VB team has posted a really cool series of blog posts that talk about some of the new VS 2008 editor and IDE features.  Read Part 1: Intellisense Everywhere, Part 2: IntelliSense is now Transparent, Part 3: Ctrl+Tab to Navigate Windows, Part 4: What You Can Do with Debugger DataTips, and Part 5: VB IntelliSense now filters as you type.

·         Web Server Settings for ASP.NET Web Application Projects can now be stored per user as well as per project: The VS Web Tools Team has a nice post that describes how you can now store web server settings per-user instead of per-project.  This is very useful for multi-developer scenarios (where you don't want to check-in these values into source control).

·         Using Ctrl-Break to Stop VS Building: Steven Harman points out a cool tip/trick, which is that you can use the Ctrl-Break key within Visual Studio to kill the current compilation build.  A useful tip if you've accidentally kicked off a long build or get tired waiting for it to finish.

·         Visual Studio 2008 Trouble Shooting Guide: If you run into any issues installing VS 2008, make sure to check out this blog post.  It details a bunch of common causes of failures, and how to fix them.

.NET

·         Marshaling between Managed and Unmanaged Code: Yi Zhang and Xiaoying Guo from my team in Shanghai have written a great MSDN article that describes how to use the marshaling interop features of the CLR to call native code.  One of the tools they highlight is an awesome P/Invoke Interop Assistant application they built that makes it much, much easier to generate p/invoke interop signatures when calling native methods.  A must-have tool for anyone doing native/managed interop!

·         .NET Framework 3.5 Poster: Brad Abrams posts about the cool new .NET Framework 3.5 posters now available for download (now in multiple file formats).

IIS

·         Microsoft Web Deployment Tool Technical Preview 1: Yesterday the IIS team posted the first preview of a new Microsoft Web Deployment tool.  This tool works with both IIS6 and IIS7 and enables automated deployment, synchronization, and migrating of applications on web servers.  If you are looking for a great way to automate the deployment of your ASP.NET applications then this tool is definitely one to check out.  To learn more, read the walkthroughs at the bottom of this page (in particular the "Introduction to MS Deploy" one).  This tool is awesome and should make automated deployment much easier.
Hope this helps,
Scott

+ Recent posts