熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

ASP.NET獲取MS SQL Server安裝實例

2022-06-13   來源: .NET編程 

  View Code

  protected void Page_Load(object sender EventArgs e)

  {

  DataTable dataTable = SqlDataSourceEnumeratorInstanceGetDataSources();

  foreach (DataRow dr in dataTableRows)

  {

  if (stringIsNullOrEmpty(dr["InstanceName"]ToString()))

  thisDropDownListInstanceItemsAdd(stringConcat(dr["ServerName"]));

  else

  thisDropDownListInstanceItemsAdd(stringConcat(dr["ServerName"] "" dr["InstanceName"]));

  }

  }


From:http://tw.wingwit.com/Article/program/net/201311/14177.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.