我有單個項目(c#)並具有以下代碼。 一切工作正常。但我只想知道 如何測試它並在Visual Studio 2010中查看結果。 我是經典的asp開發人員,始終使用Response.end()
來獲取結果。但不知道如何在c#項目中做到這一點。謝謝。在Visual Studio 2010中測試無效
public static string ApplicationLocationList()
{
GetApplicationLocationListTableAdapter getApplicationLocationListTableAdapter = new GetApplicationLocationListTableAdapter();
DataTable dtgetApplicationLocationListTableAdapter.GetApplicationLocationListData(Library.MovieClass.saveApplicationID);
if (dt.Rows.Count > 0)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < dt.Rows.Count; i++)
{
string cityList = dt.Rows[i]["City"].ToString();
string stateList = dt.Rows[i]["State"].ToString();
sb.Append(cityList + "," + stateList + System.Environment.NewLine);
}
return sb.ToString();
}
else
{
return string.Empty;
}
}