It use to Windows2000
How to use.
1. Download file.
2. patch.
3. restart.
4. Very Easy..^^
'분류 전체보기'에 해당되는 글 27건
- 2007.03.28 SvcHost Patch
- 2007.03.28 USB Boot 디스크 만들기
- 2007.03.28 마샬링(Marshaling)이란?
- 2007.03.28 SqlClient 공급자의 Connection 설정하기
- 2007.03.15 필수로 알아야 할 Transact-SQL 문
- 2007.03.08 Calendar의 특정 일, 주, 달을 선택했을 때 발생하는 SelectionChanged 이벤트 예제
- 2007.03.07 [ASP.NET 예제1] DropDownList(일명콤보박스)를 이용한 이미지 변환
묶어서 클라이언트에게 전송한다. 이러한 정보를 묶는 작업을
마샬링(Marshaling)이라고 부른다.
■ 마샬링(Marshaling)의 종류와 구현
▷ 참조 마샬링(Mashal By Reference)
- MarshalByRefObject를 상속
▶ 참조 마샬링(MBR)을 위한 클래스
- public class MarshalSample : MarshalByRefObject {}
▷ 값 마샬링(Mashal By Value)
- Serializable Attribute를 지정하거나 ISerializable 인터페이스를 구현
▶ 값 마샬링(MBV)을 위한 클래스
- public class SerialSample {}
SQL DB 연결순서
1. 네임스페이스 명시
- using System.Data.SqlClient;
2. Connection 객체생성(연결 프로퍼티 설정)
- SqlConnection conn;
- conn = new SqlConnection("Server=localhost; user id=sa; pwd=1234; database=SqlDB");
3. Connection 연결
- conn.Open();
4. 작업수행(SQL 쿼리 작업)
5. 연결 닫기
- conn.Close();
※ SqlClient 연결(MS-Sql)
- using System.Data.SqlClient;
- SqlConnection conn = new Sql Connection("Server=localhost; user id=sa; pwd=1234; database=SqlDB");
- conn.Open();
※ OleDb 연결(Microsoft Access)
- using System.Data.OleDb;
- OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\NWind.mdb");
- conn.Open();
원하는 순서대로 정렬하여 출력 : ORDER BY
결과물에 대해 영향을 미치지는 않지만, 결과가 출력되는 순서를 조절하는 구문이다.
기본적으로 오름차순(ASCENDING)으로 정렬되며, 내림차순(DESCENDING)으로 정렬하기 위해서는 DESC라고 적어주면 된다. 오름차순은 ASC이다.
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
Calendar1.SelectionMode = (CalendarSelectionMode)DropDownList1.SelectedIndex;
if (Calendar1.SelectionMode == CalendarSelectionMode.None)
Calendar1.SelectedDates.Clear();
}
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
switch (Calendar1.SelectedDates.Count)
{
case(0): //none
Response.Write("어떤 일자도 선택되지 않았네요^^");
break;
case(1): //Day
Response.Write("선택한 일자" + Calendar1.SelectedDate.ToShortDateString());
break;
case(7): //Week
Response.Write("선택한 주의 시작 일자" +
Calendar1.SelectedDate.ToShortTimeString());
break;
default: //Month
Response.Write("선택한 달의 시작 일자" +
Calendar1.SelectedDate.ToShortTimeString());
break;
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>제목 없음</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h3>Calendar의 SelectionChanged 이벤트를 사용한 예제</h3>
SelectionMode선택 :
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem Value="None">None</asp:ListItem>
<asp:ListItem Value="Day" Selected="True">Day</asp:ListItem>
<asp:ListItem Value="DayWeekMonth">DayWeekMonth</asp:ListItem>
</asp:DropDownList>
<p></p>
<asp:Calendar ID="Calendar1" runat="server" OnSelectionChanged="Calendar1_SelectionChanged"></asp:Calendar>
</div>
</form>
</body>
</html>
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (DropDownList1.SelectedItem.Value == "0")
Image1.ImageUrl = "이미지 경로1";
else
Image1.ImageUrl = "이미지 경로2";
Image1.AlternateText=DropDownList1.SelectedItem.Text;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>제목 없음</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h3>이미지예제</h3>
<asp:Image ID="Image1" runat="server" />
<p></p>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
<asp:ListItem Value="0">성형 전</asp:ListItem>
<asp:ListItem Value="1">성형 후</asp:ListItem>
</asp:DropDownList>
</div>
</form>
</body>
</html>