Most Popular Questions and Answers on ASP.NET Whidbey(from asp.net forums,write by ASP.NET Team)

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.
posted on 2006-03-31 18:13  Carlwave-陆飞(Fei.Lu)  阅读(687)  评论(0编辑  收藏  举报