當我在Visual Studio 2012中,並在asp.net頁面上工作時,我的設計和拆分按鈕丟失。我只有源。我怎樣才能讓這些回來。在Visual Studio 2012中缺少按鈕
0
A
回答
1
看看窗口的底部。在這個問題 請看: Where has Design View gone in Visual Studio 2012?
如果它們不存在,使他們: Visual Studio 2012 - where has ASPX design and split view gone?
0
<TabControl TabStripPlacement="Top">
<TabItem Header="Ex1" Width="100">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="129*"/>
<ColumnDefinition Width="23*"/>
<ColumnDefinition Width="355*"/>
</Grid.ColumnDefinitions>
<Button Content="Get Data" HorizontalAlignment="Left" Margin="61,22,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click" Grid.Column="2"/>
<ListBox Name="lbxDisplay" HorizontalAlignment="Left" Height="195" Margin="24,59,0,0" VerticalAlignment="Top" Width="456" Grid.ColumnSpan="3"/>
</Grid>
</TabItem>
<TabItem Header="Ex2" Width="100">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="22*"/>
<ColumnDefinition Width="20*"/>
<ColumnDefinition Width="465*"/>
</Grid.ColumnDefinitions>
<Button Content="GetData2" Name="GetData2" HorizontalAlignment="Left" Margin="171,22,0,0" VerticalAlignment="Top" Width="75" Click="GetData2_Click" Grid.Column="2"/>
<ListBox Name="lbx1" HorizontalAlignment="Left" Height="195" Margin="2,59,0,0" VerticalAlignment="Top" Width="209" Grid.Column="1" Grid.ColumnSpan="2" SelectionChanged="lbx1_SelectionChanged" />
<ListBox Name="lbx2" HorizontalAlignment="Left" Height="195" Margin="233,59,0,0" VerticalAlignment="Top" Width="207" Grid.Column="2"/>
</Grid>
</TabItem>
<TabItem Header="Ex3" Width="100">
<Grid Margin="9,14,16,28">
<Button Content="Get Data3" Name="GetData3" HorizontalAlignment="Left" Margin="213,22,0,0" VerticalAlignment="Top" Width="75" Click="GetData3_Click"/>
<DataGrid Name="dgDisplay3" Margin="0,51,0,0" RenderTransformOrigin="0.5,0.5" >
<DataGrid.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform AngleX="1.193"/>
<RotateTransform/>
<TranslateTransform X="-1.479"/>
</TransformGroup>
</DataGrid.RenderTransform>
</DataGrid>
</Grid>
</TabItem>
<TabItem Header="Ex4" Width="100">
<Grid>
<Button Content="Get Data" Name="GetData4" HorizontalAlignment="Left" Margin="213,22,0,0" VerticalAlignment="Top" Width="75" Click="GetData4_Click"/>
<DataGrid Name ="dgDisplay4" Margin="10,62,10,10"></DataGrid>
</Grid>
</TabItem>
<TabItem Header="Ex5" Width="100">
<Grid>
<Button Content="Get Data" Name="GetData5" HorizontalAlignment="Left" Margin="213,22,0,0" VerticalAlignment="Top" Width="75" Click="GetData5_Click"/>
<DataGrid Name ="dgDisplay5" Margin="10,62,10,10"></DataGrid>
</Grid>
</TabItem>
</TabControl>
//1. Retrieve customer names and display alphabetically in a listbox
private void Button_Click(object sender, RoutedEventArgs e)
{
DataClasses1DataContext db = new DataClasses1DataContext();
var query = from c in db.Customers
orderby c.ContactName ascending
select c.ContactName;
lbxDisplay.ItemsSource = query.ToList();
}
//2.(a) One on left displays supplier name.
private void GetData2_Click(object sender, RoutedEventArgs e)
{
DataClasses1DataContext db = new DataClasses1DataContext();
var query = from s in db.Suppliers
select s.CompanyName;
lbx1.ItemsSource = query.ToList();
lbx1.SelectedIndex = 0;
}
//(b) When a name is selected on this list the products for this supplier are displayed on the right
private void lbx1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
DataClasses1DataContext db = new DataClasses1DataContext();
string companyName = lbx1.SelectedValue.ToString();
var query2 = from s in db.Suppliers
join p in db.Products
on s.SupplierID equals p.SupplierID
where s.CompanyName == companyName
select p.ProductName;
lbx2.ItemsSource = query2.ToList();
}
//3. Select the following product information and display on a DataGrid
//Product Name //Supplier Name //Unit Price
private void GetData3_Click(object sender, RoutedEventArgs e)
{
DataClasses1DataContext db = new DataClasses1DataContext();
var query3 = from s in db.Suppliers
join p in db.Products
on s.SupplierID equals p.SupplierID
select new
{
Name = s.CompanyName,
Product = p.ProductName,
Price = p.UnitPrice
};
dgDisplay3.ItemsSource = query3.ToList();
}
//4. Display Customer ID and Number of Orders sorted with highest number of orders first
//using Orderby
private void GetData4_Click(object sender, RoutedEventArgs e)
{
DataClasses1DataContext db = new DataClasses1DataContext();
var query4 = from o in db.Orders
join od in db.Order_Details
on o.OrderID equals od.OrderID
orderby od.Quantity descending
select new
{
CustomerId = o.CustomerID,
NumberofOrders = od.Quantity,
};
dgDisplay4.ItemsSource = query4.ToList();
}
//5. Display the following information from the Orders and Customer tables ordered by count of orders
// Customer ID // Company Name // Number of Orders // Contact Name // Contact Phone
//Hint: Use Group and Join
private void GetData5_Click(object sender, RoutedEventArgs e)
{
DataClasses1DataContext db = new DataClasses1DataContext();
var query5 = from o in db.Orders
group o by o.CustomerID into g
join c in db.Customers on g.Key equals c.CustomerID
orderby g.Count() descending
select new
{
CustomerId = g.Key,
CompanyName = c.CompanyName,
OrderCount = g.Count(),
ContactName = c.ContactName,
ContactPhone = c.Phone
};
dgDisplay5.ItemsSource = query5;
}
}//end class
相關問題
- 1. Visual Studio 2012缺少框架
- 2. 從visual studio 2012中缺少XAML UI Editor
- 3. 引用缺少路徑 - Visual Studio 2012
- 4. 缺少程序集引用Visual Studio 2012
- 5. 缺少「部署」-Button Visual Studio 2012
- 6. 「部署」選項缺少Visual Studio 2012
- 7. 在Visual Studio 2012中缺少Visual C++的先決條件
- 8. 在Visual Studio中缺少ContextMenu.isOpen
- 9. 在Aspx文件中缺少Visual Studio展開/摺疊按鈕
- 10. 爲什麼在Visual Studio中缺少Visual Studio 2012 - Windows XP(v110_xp)的選項?
- 11. 如何協調在Visual Studio中缺少宏的2012
- 12. 在Visual Studio 2012中缺少層交互分析窗格
- 13. 在Microsoft Visual Studio 2012中使用Excel庫時缺少引用
- 14. 在Visual Studio 2012中缺少模板Direct3D應用程序
- 15. 在Visual Studio 2012中缺少其他項目類型
- 16. 在Visual Studio 2012中缺少部署項目類型
- 17. Visual Studio 2012「顯示所有文件」按鈕缺失
- 18. Visual Studio 2008中缺少
- 19. Visual Studio 2010中:DLL缺少
- 20. Visual Studio 2012中項目屬性中缺少編譯選項卡
- 21. Visual Studio 2012中缺少數據比較功能?
- 22. 的Qt構建失敗因缺少的std ::在Visual Studio 2012
- 23. SHA1(和全加密命名空間)在Visual Studio 2012缺少
- 24. 在Visual Studio中缺少DLL錯誤
- 25. 在Visual Studio中缺少狀態欄?
- 26. 擺脫在Visual Studio中缺少-D__STDC_CONSTANT_MACROS
- 27. 在Visual Studio 2010中缺少引用
- 28. 在Visual Studio 2008中缺少Siverlight模板
- 29. 在Visual Studio 2015中缺少Web項目
- 30. 在Visual Studio 2010 SP1中缺少MVC3
你應該問這個超級用戶 – Quannt
這是一個Web窗體項目或MVC項目? – niico