SqlDataSource 클래스

정의

데이터 바인딩된 컨트롤의 SQL 데이터베이스를 나타냅니다.

public ref class SqlDataSource : System::Web::UI::DataSourceControl
[System.Drawing.ToolboxBitmap(typeof(System.Web.UI.WebControls.SqlDataSource))]
public class SqlDataSource : System.Web.UI.DataSourceControl
[<System.Drawing.ToolboxBitmap(typeof(System.Web.UI.WebControls.SqlDataSource))>]
type SqlDataSource = class
    inherit DataSourceControl
Public Class SqlDataSource
Inherits DataSourceControl
상속
파생
특성

예제

이 섹션에서는 네 가지 코드 예제가 포함 되어 있습니다.

  • 첫 번째 코드 예제에는 SQL server에서 데이터를 표시 하는 방법을 보여 줍니다.는 GridView 선언적 구문을 사용 하 여 제어 합니다.

  • 두 번째 코드 예제는 ODBC 호환 데이터베이스의 데이터를에서 표시 하는 방법에 설명 된 GridView 선언적 구문을 사용 하 여 제어 합니다.

  • 세 번째 코드 예제에서 데이터 표시 및 업데이트 하는 방법을 보여 줍니다는 GridView 제어 합니다.

  • 네 번째 코드 예제에서 데이터 표시 및 업데이트 하는 방법을 보여 줍니다는 DropDownList 제어 합니다.

    참고

    이러한 예제에는 데이터 액세스에 대 한 선언적 구문을 사용 하는 방법을 보여 줍니다. 태그 대신 코드를 사용 하 여 데이터에 액세스 하는 방법에 대 한 자세한 내용은 Visual Studio에서 데이터 액세스합니다.

다음 코드 예제에 사용 하는 방법을 보여 줍니다.는 SqlDataSource SQL Server에서 데이터를 검색 및 표시를 선언적으로 제어를 GridView 제어 합니다.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">

      <asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          DataSourceMode="DataReader"
          ConnectionString="<%$ ConnectionStrings:MyNorthwind%>"
          SelectCommand="SELECT FirstName, LastName, Title FROM Employees">
      </asp:SqlDataSource>

      <asp:GridView
          id="GridView1"
          runat="server"
          DataSourceID="SqlDataSource1">
      </asp:GridView>

    </form>
  </body>
</html>
<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">

      <asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          DataSourceMode="DataReader"
          ConnectionString="<%$ ConnectionStrings:MyNorthwind%>"
          SelectCommand="SELECT FirstName, LastName, Title FROM Employees">
      </asp:SqlDataSource>

      <asp:GridView
          id="GridView1"
          runat="server"
          DataSourceID="SqlDataSource1">
      </asp:GridView>

    </form>
  </body>
</html>

다음 코드 예제에 사용 하는 방법을 보여 줍니다.는 SqlDataSource 컨트롤에 표시 하는 ODBC 호환 데이터베이스에서 데이터를 검색을 선언적으로 GridView 제어 합니다. 합니다 ProviderName 속성의 이름은.NET Framework Data Provider for ODBC는 System.Data.Odbc합니다.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <!-- This example uses a Northwind database that is hosted by an ODBC-compliant
         database. To run this sample, create an ODBC DSN to any database that hosts
         the Northwind database, including Microsoft SQL Server or Microsoft Access,
         change the name of the DSN in the ConnectionString, and view the page.
    -->
    <form id="form1" runat="server">

      <asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          ProviderName="System.Data.Odbc"
          DataSourceMode="DataReader"
          ConnectionString="dsn=myodbc3dsn;"
          SelectCommand="SELECT FirstName, LastName, Title FROM Employees">
      </asp:SqlDataSource>

      <asp:GridView
          id="GridView1"
          runat="server"
          DataSourceID="SqlDataSource1">
      </asp:GridView>

    </form>
  </body>
</html>
<%@Page  Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <!-- This example uses a Northwind database that is hosted by an ODBC-compliant
         database. To run this sample, create an ODBC DSN to any database that hosts
         the Northwind database, including Microsoft SQL Server or Microsoft Access,
         change the name of the DSN in the ConnectionString, and view the page.
    -->
    <form id="form1" runat="server">

      <asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          ProviderName="System.Data.Odbc"
          DataSourceMode="DataReader"
          ConnectionString="dsn=myodbc3dsn;"
          SelectCommand="SELECT FirstName, LastName, Title FROM Employees">
      </asp:SqlDataSource>

      <asp:GridView
          id="GridView1"
          runat="server"
          DataSourceID="SqlDataSource1">
      </asp:GridView>

    </form>
  </body>
</html>

다음 코드 예제에서는 일반적인 표시 및 업데이트 시나리오를 보여 줍니다는 GridView 제어 합니다. 이전 예제를 사용 하 여 Northwind 데이터베이스에서 데이터에 표시 되는 여 GridView 제어 합니다. 또한 때문에 UpdateCommand 속성이 지정 되어 및 AutoGenerateEditButton 속성이 true를 편집 하 고 추가 코드 없이 사용 하 여 레코드를 업데이트할 수 있습니다. GridView 컨트롤이 자동으로 매개 변수를 추가 처리를 UpdateParameters 컬렉션과 호출 합니다 Update 메서드 때를 업데이트 단추를 GridView 컨트롤을 클릭할.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">

      <asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          DataSourceMode="DataSet"
          ConnectionString="<%$ ConnectionStrings:MyNorthwind%>"
          SelectCommand="SELECT EmployeeID,FirstName,LastName,Title FROM Employees"
          UpdateCommand="Update Employees SET FirstName=@FirstName,LastName=@LastName,Title=@Title WHERE EmployeeID=@EmployeeID">
      </asp:SqlDataSource>

      <asp:GridView
          id="GridView1"
          runat="server"
          AutoGenerateColumns="False"
          DataKeyNames="EmployeeID"
          AutoGenerateEditButton="True"
          DataSourceID="SqlDataSource1">
          <columns>
              <asp:BoundField HeaderText="First Name" DataField="FirstName" />
              <asp:BoundField HeaderText="Last Name" DataField="LastName" />
              <asp:BoundField HeaderText="Title" DataField="Title" />
          </columns>

      </asp:GridView>

    </form>
  </body>
</html>
<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">

      <asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          DataSourceMode="DataSet"
          ConnectionString="<%$ ConnectionStrings:MyNorthwind%>"
          SelectCommand="SELECT EmployeeID,FirstName,LastName,Title FROM Employees"
          UpdateCommand="Update Employees SET FirstName=@FirstName,LastName=@LastName,Title=@Title WHERE EmployeeID=@EmployeeID">
      </asp:SqlDataSource>

      <asp:GridView
          id="GridView1"
          runat="server"
          AutoGenerateColumns="False"
          DataKeyNames="EmployeeID"
          AutoGenerateEditButton="True"
          DataSourceID="SqlDataSource1">
          <columns>
              <asp:BoundField HeaderText="First Name" DataField="FirstName" />
              <asp:BoundField HeaderText="Last Name" DataField="LastName" />
              <asp:BoundField HeaderText="Title" DataField="Title" />
          </columns>

      </asp:GridView>
    </form>
  </body>
</html>

다음 코드 예제에서는 일반적인 표시 및 업데이트 시나리오를 보여 줍니다.는 DropDownListTextBox 컨트롤입니다. DropDownList 제어 매개 변수 업데이트를 자동으로 추가 되지 않습니다는 UpdateParameters 컬렉션도 호출을 Update 메서드, 그렇게 해야 합니다. 업데이트 매개 변수를 선언적으로 지정 되 고 수행 하는 이벤트 처리기를 추가할 수는 Update 이벤트가 발생할 때 작업 합니다.

중요

이 예제에는 잠재적인 보안 위협을 사용자 입력을 허용 하는 텍스트 상자가 포함 됩니다. 기본적으로 ASP.NET 웹 페이지는 사용자 입력 내용에 스크립트 또는 HTML 요소가 포함되어 있지 않은지 확인합니다. 자세한 내용은 Script Exploits Overview를 참조하세요.

<%@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">
 private void On_Click(Object source, EventArgs e) {
    try {
        SqlDataSource1.Update();
    }
    catch (Exception except) {
        // Handle the Exception.
    }

    Label2.Text="The record was updated successfully!";
 }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
      <asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          ConnectionString="<%$ ConnectionStrings:MyNorthwind%>"
          SelectCommand="SELECT EmployeeID, LastName, Address FROM Employees"
          UpdateCommand="UPDATE Employees SET Address=@Address WHERE EmployeeID=@EmployeeID">
          <UpdateParameters>
              <asp:ControlParameter Name="Address" ControlId="TextBox1" PropertyName="Text"/>
              <asp:ControlParameter Name="EmployeeID" ControlId="DropDownList1" PropertyName="SelectedValue"/>
          </UpdateParameters>
      </asp:SqlDataSource>

      <asp:DropDownList
          id="DropDownList1"
          runat="server"
          DataTextField="LastName"
          DataValueField="EmployeeID"
          DataSourceID="SqlDataSource1">
      </asp:DropDownList>

      <br />
      <asp:Label id="Label1" runat="server" Text="Enter a new address for the selected user."
        AssociatedControlID="TextBox1" />
      <asp:TextBox id="TextBox1" runat="server" />
      <asp:Button id="Submit" runat="server" Text="Submit" OnClick="On_Click" />

      <br /><asp:Label id="Label2" runat="server" Text="" />

    </form>
  </body>
</html>
<%@Page  Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

 Sub On_Click(ByVal source As Object, ByVal e As EventArgs)
    Try
        SqlDataSource1.Update()
    Catch except As Exception
        ' Handle the Exception.
    End Try

    Label2.Text="The record was updated successfully!"

 End Sub 'On_Click
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
      <asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          ConnectionString="<%$ ConnectionStrings:MyNorthwind%>"
          SelectCommand="SELECT EmployeeID, LastName, Address FROM Employees"
          UpdateCommand="UPDATE Employees SET Address=@Address WHERE EmployeeID=@EmployeeID">
          <UpdateParameters>
              <asp:ControlParameter Name="Address" ControlId="TextBox1" PropertyName="Text"/>
              <asp:ControlParameter Name="EmployeeID" ControlId="DropDownList1" PropertyName="SelectedValue"/>
          </UpdateParameters>
      </asp:SqlDataSource>

      <asp:DropDownList
          id="DropDownList1"
          runat="server"
          DataTextField="LastName"
          DataValueField="EmployeeID"
          DataSourceID="SqlDataSource1">
      </asp:DropDownList>

      <br />
      <asp:Label id="Label1" runat="server" Text="Enter a new address for the selected user."
        AssociatedControlID="TextBox1" />
      <asp:TextBox id="TextBox1" runat="server" />
      <asp:Button id="Submit" runat="server" Text="Submit" OnClick="On_Click" />

      <br /><asp:Label id="Label2" runat="server" Text="" />
    </form>
  </body>
</html>

설명

항목 내용

소개

SqlDataSource 데이터 소스 컨트롤 데이터 바인딩된 컨트롤에는 SQL 관계형 데이터베이스의 데이터를 나타냅니다. 사용할 수는 SqlDataSource 관계형 데이터베이스에서 데이터를 검색 및 표시, 편집 및 적거나 없는 코드를 사용 하 여 웹 페이지에서 데이터를 정렬 하는 데이터 바인딩된 컨트롤과 함께에서 제어 합니다.

데이터 연결

설정 데이터베이스에 연결 해야 합니다는 ConnectionString 유효한 연결 문자열 속성입니다. SqlDataSource 와 같은 ADO.NET 공급자를 사용 하 여 연결할 수 있는 모든 SQL 관계형 데이터베이스를 지원할 수는 SqlClient, OleDb, Odbc, 또는 OracleClient 공급자입니다. 연결 문자열을 보호 하는 방법에 대 한 정보를 참조 하세요 방법: 컨트롤을 사용 하 여 데이터 원본 때 보안 연결 문자열합니다.

기본 데이터베이스에서 데이터를 검색할 설정의 SelectCommand SQL 쿼리를 사용 하 여 속성입니다. 경우 데이터베이스는 합니다 SqlDataSource 관련이 지 원하는 저장 프로시저를 사용 하 여 설정할 수 있습니다는 SelectCommand 속성을 저장된 프로시저의 이름입니다. 지정 하는 SQL 쿼리 매개 변수가 있는 쿼리일 수 있습니다. 추가할 수 있습니다 Parameter 매개 변수가 있는 쿼리를 사용 하 여 연결 된 개체는 SelectParameters 컬렉션입니다. 매개 변수가 있는 SQL 쿼리 및 해당 구문에 대 한 자세한 내용은 참조 하세요. 필터링에 대 한 데이터 소스 컨트롤을 사용 하 여 매개 변수를 사용 하 여입니다.

SqlDataSource 컨트롤 데이터를 검색할 때마다는 Select 메서드가 호출 됩니다. 이 메서드는 지정 된 메서드에 프로그래밍 방식 액세스를 제공 SelectMethod 속성입니다. Select 자동으로 메서드는 컨트롤에 바인딩되는 SqlDataSource 때 해당 DataBind 메서드가 호출 됩니다. 설정 하는 경우는 DataSourceID 데이터 바인딩된 컨트롤의 속성, 컨트롤을 자동으로 데이터에 바인딩하 필요에 따라 데이터 원본에서 합니다. 설정 합니다 DataSourceID 속성은 바인딩에 대 한 권장 되는 메서드는 ObjectDataSource 컨트롤을 데이터 바인딩된 컨트롤입니다. 사용할 수 있습니다 합니다 DataSource 속성인 있지만 명시적으로 호출 해야 합니다 DataBind 데이터 바인딩된 컨트롤의 메서드. 사용할 수 있는 데이터 바인딩된 컨트롤의 예로 SqlDataSource 됩니다 DataGridDetailsViewDataList, 및 DropDownList합니다. 호출할 수 있습니다는 Select 메서드 프로그래밍 방식으로 언제 든 지 기본 데이터베이스에서 데이터를 검색 합니다.

선언적 및 프로그래밍 방식으로 ASP.NET 시나리오에서 설정할 수 있습니다 합니다 DataSourceID 의 ID 데이터 바인딩된 컨트롤의 속성을 SqlDataSource 제어 합니다. 인스턴스를 할당할 수도 있습니다는 SqlDataSource 클래스는 DataSource 데이터 바인딩된 컨트롤의 속성입니다. 바인딩 데이터 바인딩된 컨트롤을 데이터 소스 컨트롤에 대 한 자세한 내용은 참조 하세요. ASP.NET 데이터 액세스 옵션합니다.

데이터 작업을 수행합니다.

인스턴스의 구성과 내부 데이터베이스 제품의 기능에 따라는 SqlDataSource 클래스를 삽입, 업데이트 및 삭제와 같은 데이터 작업을 수행할 수 있습니다. 이러한 데이터 작업을 수행 하려면 적절 한 명령 텍스트 및 수행 하려는 작업에 대 한 연결된 매개 변수를 설정 합니다. 예를 들어, 업데이트 작업을 설정 합니다 UpdateCommand 속성은 SQL 문자열이 나 저장된 프로시저의 이름으로 모든 필수 매개 변수를 추가 하 고는 UpdateParameters 컬렉션입니다. 업데이트가 수행 되는 경우는 Update 메서드가 호출 되는 데이터 바인딩된 컨트롤에 의해 코드에서 명시적으로 또는 자동으로 합니다. 동일한 일반 패턴에 대 한 뒤 DeleteInsert 작업 합니다.

SQL 쿼리 및에서 사용 하는 명령을 SelectCommand, UpdateCommand, InsertCommand, 및 DeleteCommand 속성을 매개 변수화 할 수 있습니다. 이 쿼리 또는 명령을 리터럴 값 대신 자리 표시자를 사용할 수 있으며 애플리케이션 또는 사용자 정의 변수 자리 표시자를 바인딩할 의미 합니다. 세션 변수에, Web Forms 페이지에 대 한 쿼리 문자열에 전달 되는 값, 다른 서버 컨트롤의 속성 값을 SQL 쿼리에서 매개 변수를 바인딩할 수 있습니다. SQL 쿼리와 매개 변수를 사용 하는 방법에 대 한 자세한 합니다 SqlDataSource를 참조 하세요 필터링에 대 한 데이터 소스 컨트롤을 사용 하 여 매개 변수를 사용 하 여SqlDataSource컨트롤을사용하여매개변수를사용하여.

참고

기본적으로 매개 변수 중 하나가 null 실행 하는 경우는 Select 명령을 데이터 없음이 반환 되 고 예외가 throw 됩니다. 설정 하 여이 동작을 변경할 수는 CancelSelectOnNullParameter 속성을 false입니다.

데이터 공급자

기본적으로 컨트롤은 SqlDataSource SQL Server .NET Framework 데이터 공급자와 함께 작동하지만 SqlDataSource Microsoft SQL Server 관련이 없습니다. 연결할 수는 SqlDataSource 관리 되는 ADO.NET 공급자가 모든 데이터베이스 제품을 사용 하 여 제어 합니다. 와 함께 사용할 경우는 System.Data.OleDb 공급자는 SqlDataSource 모든 OLE DB 호환 데이터베이스로 작업할 수 있습니다. 와 함께 사용할 경우는 System.Data.Odbc 공급자는 SqlDataSource ODBC 드라이버 및 IBM DB2, MySQL 및 PostgreSQL을 비롯 하 여 데이터베이스를 사용 하 여 사용할 수 있습니다. 와 함께 사용할 경우는 System.Data.OracleClient 공급자는 SqlDataSource 8.1.7 Oracle 데이터베이스를 사용 하 여 이상 사용할 수 있습니다. 허용 되는 공급자 목록에 등록 된는 DbProviderFactories 합니다 Machine.config 또는 Web.config 파일에서 구성 파일의 섹션입니다. 자세한 내용은 SqlDataSource 컨트롤을 사용 하 여 선택 하면 데이터입니다.

캐싱

사용 하 여 페이지의 데이터를 표시 하는 경우는 SqlDataSource 컨트롤 페이지의 성능 데이터 캐싱 데이터 소스 컨트롤의 기능을 사용 하 여 늘릴 수 있습니다. 웹 서버에서 메모리 데이터베이스 서버의 처리 부하를 줄입니다 캐싱 대부분의 경우에서 적절 한 절충 이것이입니다. SqlDataSource 자동으로 데이터를 캐시 때 합니다 EnableCaching 속성이 trueCacheDuration 속성 캐시는 캐시 엔트리가 삭제 되기 전에 데이터를 저장 하는 시간 (초) 수로 설정 됩니다. 지정할 수도 있습니다는 CacheExpirationPolicy 및 선택적 SqlCacheDependency 값입니다.

추가 기능

SqlDataSource 다음 표에 나열 된 추가 기능을 제공 합니다.

기능 요구 사항
캐싱 설정 합니다 DataSourceMode 속성을를 DataSet 값을 EnableCaching 속성을 true, 및 CacheDurationCacheExpirationPolicy 캐시 된 데이터에 대해 원하는 캐싱 동작에 따라 속성.
삭제 중 설정 된 DeleteCommand 데이터를 삭제 하는 데 사용 되는 SQL 문에 대 한 속성입니다. 이 문은 일반적으로 매개 변수화 됩니다.
필터링 설정 된 DataSourceMode 속성을는 DataSet 값입니다. 설정 합니다 FilterExpression 속성 데이터를 필터링 하는 데 사용 하는 필터링 식에 때는 Select 메서드가 호출 됩니다.
삽입 설정 된 InsertCommand SQL 문 사용 하 여 데이터를 삽입 하는 속성입니다. 이 문은 일반적으로 매개 변수화 됩니다.
페이징 하지만 현재 지원 되지 않습니다를 SqlDataSource일부 데이터 바인딩 같은 컨트롤 GridView를 설정한 경우 페이징을 지원 합니다 DataSourceMode 속성을를 DataSet 값.
선택 설정 된 SelectCommand 데이터를 검색 하는 데 사용 되는 SQL 문에 대 한 속성입니다.
정렬 DataSourceMode 속성을 DataSet으로 설정합니다.
업데이트 설정 된 UpdateCommand 데이터를 업데이트 하는 데 사용 되는 SQL 문에 대 한 속성입니다. 이 문은 일반적으로 매개 변수화 됩니다.

데이터 원본 뷰

모든 데이터 소스 컨트롤과 마찬가지로 SqlDataSource 컨트롤이 데이터 소스 뷰 클래스와 연결 되어 있습니다. SqlDataSource 컨트롤에 연결 된 하나만 SqlDataSourceView, 이름은 항상 및 Table합니다.

시각적으로 렌더링 되지를 SqlDataSource 컨트롤을 만들 수 있습니다 선언적으로, 필요에 따라 상태 관리에 참여 하도록 허용할 수 있도록 컨트롤로 구현 됩니다. 결과적으로 SqlDataSource 에서 제공 하는 것과 같은 시각적 기능을 지원 하지 않습니다 합니다 EnableTheming 또는 SkinID 속성입니다.

선언 구문

<asp:SqlDataSource
    CacheDuration="string|Infinite"
    CacheExpirationPolicy="Absolute|Sliding"
    CacheKeyDependency="string"
    CancelSelectOnNullParameter="True|False"
    ConflictDetection="OverwriteChanges|CompareAllValues"
    ConnectionString="string"
    DataSourceMode="DataReader|DataSet"
    DeleteCommand="string"
    DeleteCommandType="Text|StoredProcedure"
    EnableCaching="True|False"
    EnableTheming="True|False"
    EnableViewState="True|False"
    FilterExpression="string"
    ID="string"
    InsertCommand="string"
    InsertCommandType="Text|StoredProcedure"
    OldValuesParameterFormatString="string"
    OnDataBinding="DataBinding event handler"
    OnDeleted="Deleted event handler"
    OnDeleting="Deleting event handler"
    OnDisposed="Disposed event handler"
    OnFiltering="Filtering event handler"
    OnInit="Init event handler"
    OnInserted="Inserted event handler"
    OnInserting="Inserting event handler"
    OnLoad="Load event handler"
    OnPreRender="PreRender event handler"
    OnSelected="Selected event handler"
    OnSelecting="Selecting event handler"
    OnUnload="Unload event handler"
    OnUpdated="Updated event handler"
    OnUpdating="Updating event handler"
    ProviderName="string|System.Data.Odbc|System.Data.OleDb|
        System.Data.OracleClient|System.Data.SqlClient|
        Microsoft.SqlServerCe.Client"
    runat="server"
    SelectCommand="string"
    SelectCommandType="Text|StoredProcedure"
    SkinID="string"
    SortParameterName="string"
    SqlCacheDependency="string"
    UpdateCommand="string"
    UpdateCommandType="Text|StoredProcedure"
    Visible="True|False"
>
        <DeleteParameters>
                <asp:ControlParameter
                    ControlID="string"
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:CookieParameter
                    ConvertEmptyStringToNull="True|False"
                    CookieName="string"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:FormParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    FormField="string"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:Parameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:ProfileParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:QueryStringParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    QueryStringField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:SessionParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    SessionField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
        </DeleteParameters>
        <FilterParameters>
                <asp:ControlParameter
                    ControlID="string"
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:CookieParameter
                    ConvertEmptyStringToNull="True|False"
                    CookieName="string"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:FormParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    FormField="string"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:Parameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:ProfileParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:QueryStringParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    QueryStringField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:SessionParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    SessionField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
        </FilterParameters>
        <InsertParameters>
                <asp:ControlParameter
                    ControlID="string"
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:CookieParameter
                    ConvertEmptyStringToNull="True|False"
                    CookieName="string"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:FormParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    FormField="string"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:Parameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:ProfileParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:QueryStringParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    QueryStringField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:SessionParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    SessionField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
        </InsertParameters>
        <SelectParameters>
                <asp:ControlParameter
                    ControlID="string"
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:CookieParameter
                    ConvertEmptyStringToNull="True|False"
                    CookieName="string"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:FormParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    FormField="string"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:Parameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:ProfileParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:QueryStringParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    QueryStringField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:SessionParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    SessionField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
        </SelectParameters>
        <UpdateParameters>
                <asp:ControlParameter
                    ControlID="string"
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:CookieParameter
                    ConvertEmptyStringToNull="True|False"
                    CookieName="string"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:FormParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    FormField="string"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:Parameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:ProfileParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    PropertyName="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:QueryStringParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    QueryStringField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
                <asp:SessionParameter
                    ConvertEmptyStringToNull="True|False"
                    DefaultValue="string"
                    Direction="Input|Output|InputOutput|ReturnValue"
                    Name="string"
                    SessionField="string"
                    Size="integer"
                    Type="Empty|Object|DBNull|Boolean|Char|SByte|
                        Byte|Int16|UInt16|Int32|UInt32|Int64|UInt64|
                        Single|Double|Decimal|DateTime|String"
                />
        </UpdateParameters>
</asp:SqlDataSource>

생성자

SqlDataSource()

SqlDataSource 클래스의 새 인스턴스를 초기화합니다.

SqlDataSource(String, String)

지정된 연결 문자열과 Select 명령을 사용하여 SqlDataSource 클래스의 새 인스턴스를 초기화합니다.

SqlDataSource(String, String, String)

지정된 연결 문자열과 Select 명령을 사용하여 SqlDataSource 클래스의 새 인스턴스를 초기화합니다.

속성

Adapter

컨트롤에 대한 브라우저별 어댑터를 가져옵니다.

(다음에서 상속됨 Control)
AppRelativeTemplateSourceDirectory

이 컨트롤이 포함된 Page 또는 UserControl 개체의 애플리케이션 상대 가상 디렉터리를 가져오거나 설정합니다.

(다음에서 상속됨 Control)
BindingContainer

이 컨트롤의 데이터 바인딩이 포함된 컨트롤을 가져옵니다.

(다음에서 상속됨 Control)
CacheDuration

Select(DataSourceSelectArguments) 메서드로 검색한 데이터를 데이터 소스 컨트롤에서 캐시하는 시간(초)을 가져오거나 설정합니다.

CacheExpirationPolicy

기간과 결합될 때 데이터 소스 컨트롤에서 사용하는 캐시의 동작을 설명하는 캐시 만료 동작을 가져오거나 설정합니다.

CacheKeyDependency

데이터 소스 컨트롤에서 만든 모든 데이터 캐시 개체에 링크된 사용자 정의 키 종속성을 가져오거나 설정합니다. 이 키가 만료되면 모든 캐시 개체도 명시적으로 만료됩니다.

CancelSelectOnNullParameter

SelectParameters 컬렉션에 포함된 매개 변수가 null일 때 데이터 검색 작업이 취소되는지 여부를 나타내는 값을 가져오거나 설정합니다.

ChildControlsCreated

서버 컨트롤의 자식 컨트롤이 만들어졌는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Control)
ClientID

ASP.NET에서 생성한 서버 컨트롤 식별자를 가져옵니다.

(다음에서 상속됨 DataSourceControl)
ClientIDMode

이 속성은 데이터 소스 컨트롤에 사용되지 않습니다.

(다음에서 상속됨 DataSourceControl)
ClientIDSeparator

ClientID 속성에 사용된 구분 문자를 나타내는 문자 값을 가져옵니다.

(다음에서 상속됨 Control)
ConflictDetection

작업 시간 동안 내부 데이터베이스의 행 데이터가 변경된 경우 SqlDataSource 컨트롤이 업데이트 및 삭제를 수행하는 방법을 나타내는 값을 가져오거나 설정합니다.

ConnectionString

SqlDataSource 컨트롤에서 기본 데이터베이스에 연결하는 데 사용하는 ADO.NET 공급자 관련 연결 문자열을 가져오거나 설정합니다.

Context

현재 웹 요청에 대한 서버 컨트롤과 관련된 HttpContext 개체를 가져옵니다.

(다음에서 상속됨 Control)
Controls

UI 계층 구조에서 지정된 서버 컨트롤의 자식 컨트롤을 나타내는 ControlCollection 개체를 가져옵니다.

(다음에서 상속됨 DataSourceControl)
DataItemContainer

명명 컨테이너가 IDataItemContainer를 구현할 경우 명명 컨테이너에 대한 참조를 가져옵니다.

(다음에서 상속됨 Control)
DataKeysContainer

명명 컨테이너가 IDataKeysControl를 구현할 경우 명명 컨테이너에 대한 참조를 가져옵니다.

(다음에서 상속됨 Control)
DataSourceMode

SqlDataSource 컨트롤에서 데이터를 페치하는 데 사용할 데이터 검색 모드를 가져오거나 설정합니다.

DeleteCommand

SqlDataSource 컨트롤이 내부 데이터베이스에서 데이터를 삭제하는 데 사용하는 SQL 문자열을 가져오거나 설정합니다.

DeleteCommandType

DeleteCommand 속성의 텍스트가 SQL 문과 저장 프로시저의 이름 중 어느 것인지를 나타내는 값을 가져오거나 설정합니다.

DeleteParameters

DeleteCommand 속성에서 사용하는 매개 변수가 들어 있는 매개 변수 컬렉션을 SqlDataSourceView 컨트롤에 연결된 SqlDataSource 개체에서 가져옵니다.

DesignMode

디자인 화면에서 컨트롤이 사용 중인지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Control)
EnableCaching

SqlDataSource 컨트롤에서 데이터 캐싱이 활성화되어 있는지 여부를 나타내는 값을 가져오거나 설정합니다.

EnableTheming

이 컨트롤이 테마를 지원하는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 DataSourceControl)
EnableViewState

서버 컨트롤이 해당 뷰 상태와 포함하고 있는 모든 자식 컨트롤의 뷰 상태를, 요청하는 클라이언트까지 유지하는지 여부를 나타내는 값을 가져오거나 설정합니다.

(다음에서 상속됨 Control)
Events

컨트롤에 대한 이벤트 처리기 대리자의 목록을 가져옵니다. 이 속성은 읽기 전용입니다.

(다음에서 상속됨 Control)
FilterExpression

Select(DataSourceSelectArguments) 메서드가 호출될 때 적용되는 필터링 식을 가져오거나 설정합니다.

FilterParameters

FilterExpression 문자열의 모든 매개 변수 자리 표시자와 연결된 매개 변수 컬렉션을 가져옵니다.

HasChildViewState

현재 서버 컨트롤의 자식 컨트롤에 저장된 뷰 상태 설정 값이 있는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Control)
ID

서버 컨트롤에 할당된 프로그래밍 ID를 가져오거나 설정합니다.

(다음에서 상속됨 Control)
IdSeparator

컨트롤 식별자를 구분하는 데 사용되는 문자를 가져옵니다.

(다음에서 상속됨 Control)
InsertCommand

SqlDataSource 컨트롤에서 내부 데이터베이스에 데이터를 삽입하는 데 사용하는 SQL 문자열을 가져오거나 설정합니다.

InsertCommandType

InsertCommand 속성의 텍스트가 SQL 문과 저장 프로시저의 이름 중 어느 것인지를 나타내는 값을 가져오거나 설정합니다.

InsertParameters

InsertCommand 속성에서 사용하는 매개 변수가 들어 있는 매개 변수 컬렉션을 SqlDataSourceView 컨트롤에 연결된 SqlDataSource 개체에서 가져옵니다.

IsChildControlStateCleared

이 컨트롤에 포함된 컨트롤이 컨트롤 상태를 가지는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Control)
IsTrackingViewState

서버 컨트롤에서 해당 뷰 상태의 변경 사항을 저장하는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Control)
IsViewStateEnabled

이 컨트롤의 뷰 상태를 사용할 수 있는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Control)
LoadViewStateByID

인덱스 대신 ID별로 뷰 상태를 로드할 때 컨트롤이 참여하는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Control)
NamingContainer

동일한 ID 속성 값을 사용하는 서버 컨트롤을 구별하기 위해 고유의 네임스페이스를 만드는 서버 컨트롤의 명명 컨테이너에 대한 참조를 가져옵니다.

(다음에서 상속됨 Control)
OldValuesParameterFormatString

Delete() 또는 Update() 메서드에 전달된 모든 매개 변수의 이름에 적용할 서식 문자열을 가져오거나 설정합니다.

Page

서버 컨트롤이 들어 있는 Page 인스턴스에 대한 참조를 가져옵니다.

(다음에서 상속됨 Control)
Parent

페이지 컨트롤 계층 구조에서 서버 컨트롤의 부모 컨트롤에 대한 참조를 가져옵니다.

(다음에서 상속됨 Control)
ProviderName

SqlDataSource 컨트롤이 내부 데이터 소스에 연결하기 위해 사용하는 .NET Framework 데이터 공급자의 이름을 가져오거나 설정합니다.

RenderingCompatibility

렌더링된 HTML이 호환될 ASP.NET 버전을 지정하는 값을 가져옵니다.

(다음에서 상속됨 Control)
SelectCommand

SqlDataSource 컨트롤이 내부 데이터베이스에서 데이터를 검색하는 데 사용하는 SQL 문자열을 가져오거나 설정합니다.

SelectCommandType

SelectCommand 속성의 텍스트가 SQL 쿼리인지 아니면 저장 프로시저의 이름인지 나타내는 값을 가져오거나 설정합니다.

SelectParameters

SelectCommand 속성에서 사용하는 매개 변수가 들어 있는 매개 변수 컬렉션을 SqlDataSourceView 컨트롤에 연결된 SqlDataSource 개체에서 가져옵니다.

Site

디자인 화면에서 렌더링될 때 현재 컨트롤을 호스팅하는 컨테이너 관련 정보를 가져옵니다.

(다음에서 상속됨 Control)
SkinID

DataSourceControl 컨트롤에 적용할 스킨을 가져옵니다.

(다음에서 상속됨 DataSourceControl)
SortParameterName

저장 프로시저를 사용하여 데이터 검색을 수행할 때 검색된 데이터를 정렬하는 데 사용하는 저장 프로시저 매개 변수의 이름을 가져오거나 설정합니다.

SqlCacheDependency

Microsoft SQL Server 캐시 종속성에 사용할 데이터베이스와 테이블을 지정하는 세미콜론으로 구분된 문자열을 가져오거나 설정합니다.

TemplateControl

이 컨트롤이 포함된 템플릿의 참조를 가져오거나 설정합니다.

(다음에서 상속됨 Control)
TemplateSourceDirectory

Page 또는 현재 서버 컨트롤이 들어 있는 UserControl의 가상 디렉터리를 가져옵니다.

(다음에서 상속됨 Control)
UniqueID

서버 컨트롤에 대해 계층적으로 정규화된 고유 식별자를 가져옵니다.

(다음에서 상속됨 Control)
UpdateCommand

SqlDataSource 컨트롤에서 내부 데이터베이스의 데이터를 업데이트하는 데 사용하는 SQL 문자열을 가져오거나 설정합니다.

UpdateCommandType

UpdateCommand 속성의 텍스트가 SQL 문과 저장 프로시저의 이름 중 어느 것인지를 나타내는 값을 가져오거나 설정합니다.

UpdateParameters

UpdateCommand 속성에서 사용하는 매개 변수가 들어 있는 매개 변수 컬렉션을 SqlDataSourceView 컨트롤에 연결된 SqlDataSource 컨트롤에서 가져옵니다.

ValidateRequestMode

잠재적으로 위험한 값이 있는지 확인하기 위해 컨트롤에서 브라우저의 클라이언트 입력을 검사하는지 여부를 나타내는 값을 가져오거나 설정합니다.

(다음에서 상속됨 Control)
ViewState

같은 페이지에 대한 여러 개의 요청 전반에 서버 컨트롤의 뷰 상태를 저장하고 복원할 수 있도록 하는 상태 정보 사전을 가져옵니다.

(다음에서 상속됨 Control)
ViewStateIgnoresCase

StateBag 개체가 대/소문자를 구분하는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Control)
ViewStateMode

이 컨트롤의 뷰 상태 모드를 가져오거나 설정합니다.

(다음에서 상속됨 Control)
Visible

컨트롤이 표시되는지 여부를 나타내는 값을 가져오거나 설정합니다.

(다음에서 상속됨 DataSourceControl)

메서드

AddedControl(Control, Int32)

자식 컨트롤이 Control 개체의 Controls 컬렉션에 추가된 후 호출됩니다.

(다음에서 상속됨 Control)
AddParsedSubObject(Object)

XML 또는 HTML 요소가 구문 분석되었음을 서버 컨트롤에 알리고 서버 컨트롤의 ControlCollection 개체에 요소를 추가합니다.

(다음에서 상속됨 Control)
ApplyStyleSheetSkin(Page)

페이지 스타일시트에 정의된 스타일 속성을 컨트롤에 적용합니다.

(다음에서 상속됨 DataSourceControl)
BeginRenderTracing(TextWriter, Object)

렌더링 데이터의 디자인 타임 추적을 시작합니다.

(다음에서 상속됨 Control)
BuildProfileTree(String, Boolean)

서버 컨트롤에 대한 정보를 수집하고, 페이지에 대해 추적이 활성화된 경우 표시할 Trace 속성에 이 정보를 전달합니다.

(다음에서 상속됨 Control)
ClearCachedClientID()

캐시된 ClientID 값을 null로 설정합니다.

(다음에서 상속됨 Control)
ClearChildControlState()

서버 컨트롤의 자식 컨트롤에 대한 컨트롤 상태 정보를 삭제합니다.

(다음에서 상속됨 Control)
ClearChildState()

서버 컨트롤의 모든 자식 컨트롤에 대한 뷰 상태 정보와 컨트롤 상태 정보를 삭제합니다.

(다음에서 상속됨 Control)
ClearChildViewState()

서버 컨트롤의 모든 자식 컨트롤에 대한 뷰 상태 정보를 삭제합니다.

(다음에서 상속됨 Control)
ClearEffectiveClientIDMode()

현재 컨트롤 인스턴스 및 자식 컨트롤의 ClientIDMode 속성을 Inherit로 설정합니다.

(다음에서 상속됨 Control)
CreateChildControls()

다시 게시 또는 렌더링하기 위한 준비 작업으로, 포함된 자식 컨트롤을 만들도록 컴퍼지션 기반 구현을 사용하는 서버 컨트롤에 알리기 위해 ASP.NET 페이지 프레임워크에 의해 호출됩니다.

(다음에서 상속됨 Control)
CreateControlCollection()

자식 컨트롤을 저장할 컬렉션을 만듭니다.

(다음에서 상속됨 DataSourceControl)
CreateDataSourceView(String)

데이터 소스 컨트롤과 연결된 데이터 소스 뷰 개체를 만듭니다.

DataBind()

호출된 서버 컨트롤과 모든 해당 자식 컨트롤에 데이터 원본을 바인딩합니다.

(다음에서 상속됨 Control)
DataBind(Boolean)

DataBinding 이벤트를 발생시키는 옵션을 사용하여, 호출된 서버 컨트롤과 모든 자식 컨트롤에 데이터 소스를 바인딩합니다.

(다음에서 상속됨 Control)
DataBindChildren()

데이터 소스를 서버 컨트롤의 자식 컨트롤에 바인딩합니다.

(다음에서 상속됨 Control)
Delete()

DeleteCommand SQL 문자열과 DeleteParameters 컬렉션에 있는 매개 변수를 사용하여 삭제 작업을 수행합니다.

Dispose()

서버 컨트롤이 메모리에서 해제되기 전에 해당 서버 컨트롤에서 최종 정리 작업을 수행하도록 합니다.

(다음에서 상속됨 Control)
EndRenderTracing(TextWriter, Object)

렌더링 데이터의 디자인 타임 추적을 종료합니다.

(다음에서 상속됨 Control)
EnsureChildControls()

서버 컨트롤에 자식 컨트롤이 있는지 확인합니다. 서버 컨트롤에 자식 컨트롤이 없으면 자식 컨트롤을 만듭니다.

(다음에서 상속됨 Control)
EnsureID()

ID가 할당되지 않은 컨트롤의 ID를 만듭니다.

(다음에서 상속됨 Control)
Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
FindControl(String)

지정된 id 매개 변수를 사용하여 서버 컨트롤의 현재 명명 컨테이너를 검색합니다.

(다음에서 상속됨 DataSourceControl)
FindControl(String, Int32)

현재 명명 컨테이너에서 특정 id와 함께 pathOffset 매개 변수에 지정된 검색용 정수를 사용하여 서버 컨트롤을 검색합니다. 이 버전의 FindControl 메서드를 재정의해서는 안됩니다.

(다음에서 상속됨 Control)
Focus()

컨트롤에 대한 입력 포커스를 설정합니다.

(다음에서 상속됨 DataSourceControl)
GetDbProviderFactory()

DbProviderFactory 속성으로 식별되는 ADO.NET 공급자에 연결된 ProviderName 개체를 반환합니다.

GetDesignModeState()

컨트롤의 디자인 타임 데이터를 가져옵니다.

(다음에서 상속됨 Control)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetRouteUrl(Object)

루트 매개 변수 집합에 해당하는 URL을 가져옵니다.

(다음에서 상속됨 Control)
GetRouteUrl(RouteValueDictionary)

루트 매개 변수 집합에 해당하는 URL을 가져옵니다.

(다음에서 상속됨 Control)
GetRouteUrl(String, Object)

루트 매개 변수 집합 및 루트 이름에 해당하는 URL을 가져옵니다.

(다음에서 상속됨 Control)
GetRouteUrl(String, RouteValueDictionary)

루트 매개 변수 집합 및 루트 이름에 해당하는 URL을 가져옵니다.

(다음에서 상속됨 Control)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
GetUniqueIDRelativeTo(Control)

지정된 컨트롤의 UniqueID 속성에서 접두사 부분을 반환합니다.

(다음에서 상속됨 Control)
GetView(String)

데이터 소스 컨트롤과 연결된 명명된 데이터 소스 뷰를 가져옵니다.

GetViewNames()

SqlDataSource 컨트롤과 연결된 뷰 개체 목록을 나타내는 이름의 컬렉션을 가져옵니다.

HasControls()

서버 컨트롤에 자식 컨트롤이 있는지 확인합니다.

(다음에서 상속됨 DataSourceControl)
HasEvents()

이벤트가 컨트롤이나 자식 컨트롤에 등록되었는지 여부를 나타내는 값을 반환합니다.

(다음에서 상속됨 Control)
Insert()

InsertCommand SQL 문자열과 InsertParameters 컬렉션에 있는 매개 변수를 사용하여 삽입 작업을 수행합니다.

IsLiteralContent()

서버 컨트롤에 리터럴 내용만 저장되어 있는지 확인합니다.

(다음에서 상속됨 Control)
LoadControlState(Object)

SaveControlState() 메서드에서 저장한 이전 페이지 요청에서 컨트롤 상태 정보를 복원합니다.

(다음에서 상속됨 Control)
LoadViewState(Object)

유지해야 하는 SqlDataSource 컨트롤에 있는 속성의 상태를 로드합니다.

MapPathSecure(String)

가상 경로(절대 또는 상대)가 매핑되는 실제 경로를 가져옵니다.

(다음에서 상속됨 Control)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
OnBubbleEvent(Object, EventArgs)

서버 컨트롤의 이벤트가 페이지의 UI 서버 컨트롤 계층 구조에 전달되었는지 여부를 확인합니다.

(다음에서 상속됨 Control)
OnDataBinding(EventArgs)

DataBinding 이벤트를 발생시킵니다.

(다음에서 상속됨 Control)
OnInit(EventArgs)

LoadComplete 이벤트 처리기를 Page 컨트롤이 포함된 SqlDataSource 컨트롤에 추가합니다.

OnLoad(EventArgs)

Load 이벤트를 발생시킵니다.

(다음에서 상속됨 Control)
OnPreRender(EventArgs)

PreRender 이벤트를 발생시킵니다.

(다음에서 상속됨 Control)
OnUnload(EventArgs)

Unload 이벤트를 발생시킵니다.

(다음에서 상속됨 Control)
OpenFile(String)

파일을 읽는 데 사용되는 Stream을 가져옵니다.

(다음에서 상속됨 Control)
RaiseBubbleEvent(Object, EventArgs)

이벤트 소스와 해당 정보를 컨트롤의 부모 컨트롤에 할당합니다.

(다음에서 상속됨 Control)
RaiseDataSourceChangedEvent(EventArgs)

DataSourceChanged 이벤트를 발생시킵니다.

(다음에서 상속됨 DataSourceControl)
RemovedControl(Control)

자식 컨트롤이 Control 개체의 Controls 컬렉션에서 제거된 후 호출됩니다.

(다음에서 상속됨 Control)
Render(HtmlTextWriter)

클라이언트에서 렌더링할 콘텐츠를 쓰는 지정된 HtmlTextWriter 개체에 서버 컨트롤 콘텐츠를 보냅니다.

(다음에서 상속됨 Control)
RenderChildren(HtmlTextWriter)

클라이언트에서 렌더링될 내용을 쓰는 제공된 HtmlTextWriter 개체에 서버 컨트롤 자식의 내용을 출력합니다.

(다음에서 상속됨 Control)
RenderControl(HtmlTextWriter)

제공된 HtmlTextWriter 개체로 서버 컨트롤 콘텐츠를 출력하고 추적을 사용하는 경우 컨트롤에 대한 추적 정보를 저장합니다.

(다음에서 상속됨 DataSourceControl)
RenderControl(HtmlTextWriter, ControlAdapter)

제공된 HtmlTextWriter 개체를 사용하여 제공된 ControlAdapter 개체에 서버 컨트롤 콘텐츠를 출력합니다.

(다음에서 상속됨 Control)
ResolveAdapter()

지정된 컨트롤을 렌더링하는 컨트롤 어댑터를 가져옵니다.

(다음에서 상속됨 Control)
ResolveClientUrl(String)

브라우저에 사용할 수 있는 URL을 가져옵니다.

(다음에서 상속됨 Control)
ResolveUrl(String)

URL을 요청 클라이언트에서 사용할 수 있는 URL로 변환합니다.

(다음에서 상속됨 Control)
SaveControlState()

페이지가 서버에 다시 게시된 후 발생한 서버 컨트롤 상태의 변경을 저장합니다.

(다음에서 상속됨 Control)
SaveViewState()

SqlDataSource 컨트롤의 현재 뷰 상태를 저장합니다.

Select(DataSourceSelectArguments)

SelectCommand SQL 문자열과 SelectParameters 컬렉션에 있는 매개 변수를 사용하여 내부 데이터베이스에서 데이터를 검색합니다.

SetDesignModeState(IDictionary)

컨트롤에 대한 디자인 타임 데이터를 설정합니다.

(다음에서 상속됨 Control)
SetRenderMethodDelegate(RenderMethod)

이벤트 처리기 대리자를 할당하여 서버 컨트롤과 그 콘텐츠를 부모 컨트롤로 렌더링합니다.

(다음에서 상속됨 Control)
SetTraceData(Object, Object)

추적 데이터 키와 추적 데이터 값을 사용하여 렌더링 데이터의 디자인 타임 추적을 위한 추적 데이터를 설정합니다.

(다음에서 상속됨 Control)
SetTraceData(Object, Object, Object)

추적 개체, 추적 데이터 키와 추적 데이터 값을 사용하여 렌더링 데이터의 디자인 타임 추적을 위한 추적 데이터를 설정합니다.

(다음에서 상속됨 Control)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)
TrackViewState()

SqlDataSource 컨트롤의 뷰 상태 변경 내용을 컨트롤의 StateBag 개체에 저장할 수 있도록 추적합니다.

Update()

UpdateCommand SQL 문자열과 UpdateParameters 컬렉션의 매개 변수를 사용하여 업데이트 작업을 수행합니다.

이벤트

DataBinding

서버 컨트롤에서 데이터 소스에 바인딩할 때 발생합니다.

(다음에서 상속됨 Control)
Deleted

삭제 작업이 완료된 경우 발생합니다.

Deleting

삭제 작업 전에 발생합니다.

Disposed

ASP.NET 페이지가 요청될 때 서버 컨트롤 주기의 마지막 단계로 서버 컨트롤이 메모리에서 해제될 때 발생합니다.

(다음에서 상속됨 Control)
Filtering

필터 작업 전에 발생합니다.

Init

서버 컨트롤 주기의 첫 단계로 서버 컨트롤을 초기화할 때 이 이벤트가 발생합니다.

(다음에서 상속됨 Control)
Inserted

삽입 작업이 완료되면 발생합니다.

Inserting

삽입 작업 전에 발생합니다.

Load

Page 개체에 서버 컨트롤을 로드할 때 발생합니다.

(다음에서 상속됨 Control)
PreRender

Control 개체가 로드된 후, 렌더링 전에 발생합니다.

(다음에서 상속됨 Control)
Selected

데이터 검색 작업이 완료되면 발생합니다.

Selecting

데이터 검색 작업 전에 발생합니다.

Unload

서버 컨트롤이 메모리에서 언로드될 때 발생합니다.

(다음에서 상속됨 Control)
Updated

업데이트 작업이 완료되면 발생합니다.

Updating

업데이트 작업 전에 발생합니다.

명시적 인터페이스 구현

IControlBuilderAccessor.ControlBuilder

이 멤버에 대한 설명은 ControlBuilder를 참조하세요.

(다음에서 상속됨 Control)
IControlDesignerAccessor.GetDesignModeState()

이 멤버에 대한 설명은 GetDesignModeState()를 참조하세요.

(다음에서 상속됨 Control)
IControlDesignerAccessor.SetDesignModeState(IDictionary)

이 멤버에 대한 설명은 SetDesignModeState(IDictionary)를 참조하세요.

(다음에서 상속됨 Control)
IControlDesignerAccessor.SetOwnerControl(Control)

이 멤버에 대한 설명은 SetOwnerControl(Control)를 참조하세요.

(다음에서 상속됨 Control)
IControlDesignerAccessor.UserData

이 멤버에 대한 설명은 UserData를 참조하세요.

(다음에서 상속됨 Control)
IDataBindingsAccessor.DataBindings

이 멤버에 대한 설명은 DataBindings를 참조하세요.

(다음에서 상속됨 Control)
IDataBindingsAccessor.HasDataBindings

이 멤버에 대한 설명은 HasDataBindings를 참조하세요.

(다음에서 상속됨 Control)
IDataSource.DataSourceChanged

이 이벤트는 데이터 바인딩된 컨트롤에 영향을 주는 방식으로 데이터 소스 컨트롤이 변경된 경우에 발생합니다.

(다음에서 상속됨 DataSourceControl)
IDataSource.GetView(String)

DataSourceView 컨트롤과 연결된 명명된 DataSourceControl 개체를 가져옵니다. 일부 데이터 소스 컨트롤은 하나의 뷰만 지원하지만 다른 컨트롤은 둘 이상의 뷰를 지원합니다.

(다음에서 상속됨 DataSourceControl)
IDataSource.GetViewNames()

DataSourceView 컨트롤과 연결된 DataSourceControl 개체의 목록을 나타내는 이름 컬렉션을 가져옵니다.

(다음에서 상속됨 DataSourceControl)
IExpressionsAccessor.Expressions

이 멤버에 대한 설명은 Expressions를 참조하세요.

(다음에서 상속됨 Control)
IExpressionsAccessor.HasExpressions

이 멤버에 대한 설명은 HasExpressions를 참조하세요.

(다음에서 상속됨 Control)
IListSource.ContainsListCollection

데이터 소스 컨트롤이 하나 이상의 데이터 목록과 연결되어 있는지 여부를 나타냅니다.

(다음에서 상속됨 DataSourceControl)
IListSource.GetList()

데이터 목록의 소스로 사용할 수 있는 데이터 소스 컨트롤 목록을 가져옵니다.

(다음에서 상속됨 DataSourceControl)
IParserAccessor.AddParsedSubObject(Object)

이 멤버에 대한 설명은 AddParsedSubObject(Object)를 참조하세요.

(다음에서 상속됨 Control)

확장 메서드

FindDataSourceControl(Control)

지정된 컨트롤에 대한 데이터 컨트롤에 연결된 데이터 소스를 반환합니다.

FindFieldTemplate(Control, String)

지정된 컨트롤의 명명 컨테이너에서 지정된 열에 대한 필드 템플릿을 반환합니다.

FindMetaTable(Control)

상위 데이터 컨트롤에 대한 메타테이블 개체를 반환합니다.

GetDefaultValues(IDataSource)

지정된 데이터 소스의 기본값에 대한 컬렉션을 가져옵니다.

GetMetaTable(IDataSource)

지정된 데이터 소스 개체의 테이블에 대한 메타데이터를 가져옵니다.

TryGetMetaTable(IDataSource, MetaTable)

테이블 메타데이터를 사용할 수 있는지 여부를 결정합니다.

적용 대상

추가 정보