Most Popular Questions and Answers on ASP.NET Whidbey(from asp.net forums,write by ASP.NET Team)
2020-03-01 23:39
633 查看
Here is a list of most popular questions on ASP.NET Whidbey. This is intended to be one-stop post for most popular questions only. If you have specific questions on controls/areas, please continue to post under individual categories.
GridView:
1. How do I display cell text without wrapping?
Use DataControlField's ItemStyle.Wrap property.
2. How do I resize the column widths?
Here is a link for how to solve this and related questions in DataGrid, but the same methods apply to GridView.
3. How do I localize the column headers?
We have presented some solutions for this that you can find in the .NET Quick starts
4. How do I add up and down icons to indicate sort direction?
Handle OnRowCreated and use SortExpression and SortDirection to add the correct icon to the header cell.
5. Is there an easy way to click and edit a cell value at run time (without having to click on Edit and Update links)?
See top ten questions about asp.net data grid control.
6. How do I insert another control (such as a tree view) in a cell?
Use a templatefield with the other control inside the template.
7. Why do you fetch all grid view rows from the server for every single GridView update?
This will be addressed in Beta.
TreeView:
1. How do I request the server to return just the changes in tree nodes?
This will happen automatically if PopulateNodesFromClient is true on the TreeView and PopulateOnDemand is set to true on the TreeNode. It will only download child nodes when a user expands a node.
2. How do I customize tree node icons?
You can customize the expand/collapse image icons using the ExpandImageUrl and CollapseImageUrl properties, and you can change the entire set of expand/collapse and line icons by specifying the LineImagesFolder and using the line image generator provided by the designer. If you want to customize the images per node, you can set the ImageUrl property on the TreeNode.
WebParts:
1. How are ASP.NET and SharePoint related?
SharePoint is built on ASP.NET V1.1 today and will be built on ASP.NET Whidbey in the future.
2. Where is the WebParts information stored?
It is stored in the Page Personalization data. We have a provider model for this, and we will ship SQL and Access providers.
3. How do I store it to an XML file?
By writing a Page Personalization Provider that reads/writes XML.
4. How do I dynamically add a web part during runtime?
If you want to add the part at runtime, and want it to be saved in the personalization data (so it will appear on future requests), you should call WebPartManager.AddWebPart(). If you want to add a web part at runtime for only the current request (like adding a regular control at runtime), you should write a custom template that you use for the WebPartZone.ZoneTemplate.
Login Control:
1. Login control works great with Forms Authentication but can I make it work with Windows authentication and .NET passport Authentication as well?
Login control should only be used with Forms Authentication.
Migration:
1. What should I watch out for while migrating from VS.NET 1.x to Whidbey Alpha?
It is best to create a new Whidbey Alpha project and add existing 1.x project items. Seamless migration will be supported in release timeframe.
Hope this helps, ASP.NET Team
This posting is provided "AS IS" with no warranties, and confers no rights.
GridView:
1. How do I display cell text without wrapping?
Use DataControlField's ItemStyle.Wrap property.
2. How do I resize the column widths?
Here is a link for how to solve this and related questions in DataGrid, but the same methods apply to GridView.
3. How do I localize the column headers?
We have presented some solutions for this that you can find in the .NET Quick starts
4. How do I add up and down icons to indicate sort direction?
Handle OnRowCreated and use SortExpression and SortDirection to add the correct icon to the header cell.
5. Is there an easy way to click and edit a cell value at run time (without having to click on Edit and Update links)?
See top ten questions about asp.net data grid control.
6. How do I insert another control (such as a tree view) in a cell?
Use a templatefield with the other control inside the template.
7. Why do you fetch all grid view rows from the server for every single GridView update?
This will be addressed in Beta.
TreeView:
1. How do I request the server to return just the changes in tree nodes?
This will happen automatically if PopulateNodesFromClient is true on the TreeView and PopulateOnDemand is set to true on the TreeNode. It will only download child nodes when a user expands a node.
2. How do I customize tree node icons?
You can customize the expand/collapse image icons using the ExpandImageUrl and CollapseImageUrl properties, and you can change the entire set of expand/collapse and line icons by specifying the LineImagesFolder and using the line image generator provided by the designer. If you want to customize the images per node, you can set the ImageUrl property on the TreeNode.
WebParts:
1. How are ASP.NET and SharePoint related?
SharePoint is built on ASP.NET V1.1 today and will be built on ASP.NET Whidbey in the future.
2. Where is the WebParts information stored?
It is stored in the Page Personalization data. We have a provider model for this, and we will ship SQL and Access providers.
3. How do I store it to an XML file?
By writing a Page Personalization Provider that reads/writes XML.
4. How do I dynamically add a web part during runtime?
If you want to add the part at runtime, and want it to be saved in the personalization data (so it will appear on future requests), you should call WebPartManager.AddWebPart(). If you want to add a web part at runtime for only the current request (like adding a regular control at runtime), you should write a custom template that you use for the WebPartZone.ZoneTemplate.
Login Control:
1. Login control works great with Forms Authentication but can I make it work with Windows authentication and .NET passport Authentication as well?
Login control should only be used with Forms Authentication.
Migration:
1. What should I watch out for while migrating from VS.NET 1.x to Whidbey Alpha?
It is best to create a new Whidbey Alpha project and add existing 1.x project items. Seamless migration will be supported in release timeframe.
Hope this helps, ASP.NET Team
This posting is provided "AS IS" with no warranties, and confers no rights.
转载于:https://www.cnblogs.com/Carlwave/archive/2006/03/31/363814.html
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- Most Popular Questions and Answers on ASP.NET Whidbey(from asp.net forums,write by ASP.NET Team)
- HOW TO: Tune and Scale Performance of Applications That Are Built on the .NET Framework -zt from MS
- How to stop ASP.NET from loading all assemblies from bin on first load
- Displaying image from database... (copy from ASP.NET Forums)
- HOW TO: Tune and Scale Performance of Applications That Are Built on the .NET Framework -zt from MS
- Read and Write compressed data to a binary file using ASP.NET
- .NET Interview Questions And Answers
- DotNetNuke Announcements(from asp.net forums)
- 【ASP.NET Step by Step】之三 Master Pages and Site Navigation
- Simple ASP.NET 2.0 Tips and Tricks that You May (or may not) have Heard About [from internet]
- Diesel-engined wristwatches sales on the net which might be designed by the most beneficial worth
- 【原】用使用JavaScript展开/折叠TreeView中所有节点(Expand and Collapse All Nodes of asp.net Treeview on the client with javascript)
- ASP.NET AJAX MultiHandleSliderExtender - Slide by Year and Month
- XHTML and Accessibility in ASP.NET Whidbey
- .NET Interview Questions And Answers
- C# and ASP.NET Interview Question and Answers
- Using ASP.NET and jQuery to Pass Multiple Values from a GridView to Another Page
- .NET Interview Questions And Answers
- Cool Tips and Tricks with ASP.NET 2.0 posted by Scott
- From VB.NET to C# and Back Again [By Darren Neimke and Scott Mitchell ]