Welcome to AspAdvice Sign in | Join | Help

Three Requests for ASP.NET 4 and VS 2010

I have three things that have been on my wish list for ASP.NET and/or Visual Studio that I'm curious to know what others think.  I've mentioned some of these before on my blog or elsewhere - they're not exactly earth shattering and I'm not saying that I want them more than any other feature they might add.  But each one would make my life at least a little bit easier, if they were included by default.

So, in no particular order, here they are:

Support For Generics in ASPX Markup

Eilon posted not too long ago about this topic.  The idea here is that you should be able to write controls that take advantage of generics, and be able to declaratively specify them within your ASPX/ASCX markup.  This would allow for things like strongly typed DropDownList controls or even TextBoxes, and would also allow for MVC views to specify their ViewDataType without having to resort to code.  In the WPF world, I understand that this can be done by using the x:TypeArguments attribute.  As Silverlight 2.0 takes off, it would be great to see support for generics in its XAML markup, as well.  Limiting the discussion to ASP.NET for the moment, what should the markup look like?  Mikhail Arkhipov discussed some of the options and challenges 4 years ago, and apparently the solution was not trivial or I have to believe we would already have it.  However, I have confidence in the ASP.NET team's ability to figure this one out.

Save VS Preferences in the cloud

Since VS 2005 we've been able to save out our VS preferences to disk and then import them.  This is a great feature that I've never used - I just usually don't have access to my primary dev machine when I sit down at another one, and if it's a coworker's machine I don't want to mess with their settings.  With things like pair programming, it can be tough to use customized settings since there is no easy way to swap back and forth depending on who's at the controls.  What I would like to see is a way to recover my settings from "the cloud" so that I can get them anywhere I go via my Live ID or OpenID or whatever.  Having a quick way to switch between a couple of these would make the pair programming scenario even better.  I suggested this four years ago, and I still want it.  Another option that might help this situation is being able to run VS from a USB drive, so that it's completely portable.  This would be cool for the "walk up to any machine" scenario but a bit less useful in the pair programming scenario.  I'd go for both.  The other thing I think would be invaluable for the service method is that Microsoft would be able to mine data about users' preferences (with opt-in for the privacy paranoiacs) so that their future versions of Visual Studio would ship with defaults that were informed by thousands of real world users' preferences.

Recursive FindControl

Do a quick search for this and you'll find a number of similar implementations.  This generic recursive findcontrol looks like a pretty good one, based on some code from Palermo and myself.  Basically, these let you get a reference to a control even if it is not in the current control's Controls collection.  This happens quite often with templated controls like CreateUserWizard or LoginView or MultiView, and having a recursive findcontrol is quite a bit more flexible than hardcoding the name with $ etc (see tip 4 here).  Since I found the need for this technique, I've been adding it to my Base Page class or common class in every ASP.NET project I work on, so it seems to me it should really be built into the framework.

Published Sunday, March 16, 2008 4:24 PM by ssmith
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Three Requests for ASP.NET 4 and VS 2010

"Untitled Document" too !

Sunday, March 16, 2008 4:59 PM by Phil Winstanley

# re: Three Requests for ASP.NET 4 and VS 2010

+1 for recursive FindControl. The number of times we've asked for it, I still can't believe it's not in the framework.

Sunday, March 16, 2008 7:51 PM by Dave Sussman

# re: Three Requests for ASP.NET 4 and VS 2010

This may be too specific, but I'd like to see a "virtualpathprovider" project that builds the project in a database directly. Something akin to using filesystem or web site, but adding a third option of virtual path.

Just an idea.

Sunday, March 16, 2008 11:17 PM by JMP

# re: Three Requests for ASP.NET 4 and VS 2010

Yes! Recursive FindControl!!!!

And how about in the IDE adding runat=server automatically for all asp: controls.

Paul

Monday, March 17, 2008 2:00 AM by plitwin

# re: Three Requests for ASP.NET 4 and VS 2010

Yes, definitely get rid of the default Title="Untitled Document" and add runat="server" to asp:controls automatically, too!  I forgot about those two.

Monday, March 17, 2008 9:27 AM by ssmith

# re: Three Requests for ASP.NET 4 and VS 2010

Castle Windsor Container takes a stab at generics in XML.  

ClassType`1[[T]]

Type2`2[[T],[U]]

tranlates to

public class ClassType<T>

public class Type2<T,U>

Perhaps something of the same could be addressed for XAML.

Tuesday, March 18, 2008 12:46 AM by Robz

# re: Three Requests for ASP.NET 4 and VS 2010

Another request for the Visual Studio team - let me right-click to navigate to a user control from within an ASPX page, either on the <uc:MyControl ... /> tag or the <%@ Register Src="~/Controls/MyControl.ascx" ... %> tag.

Tuesday, March 25, 2008 10:53 AM by ssmith

# re: Three Requests for ASP.NET 4 and VS 2010

I like all 3 of your suggestions as well as Plip's suggestion in the comments and your last suggestion. My biggest suggestion would be to improve the feature set that's currently available. For instance, the calendar control has an AJAX extender. I'd like to see the calendar control revamped to detect if the user had JS enabled and return the appropriate control based on that bool. I'd also like to see improvements in the web.config intellisense, the ability to right-click on an ASP.NET element and "cut & paste" the style into your skin file, and give skins intellisense.

Thursday, March 27, 2008 2:15 PM by Jason Gaylord

# re: Three Requests for ASP.NET 4 and VS 2010

Nice ones, Jason!  Related to your skin intellisense, I think the controls that let you specify a quick look should use (or have the option to use) skins for this.  So if you go with the "Elegant" DataGridViewListThing, instead of settings a bunch of style properties, or adding html directly, it should just set a SkinID and create a Skin to use.  It could detect if themes were being used or not to make this decision, or just add a checkbox to the customize dialog that asks if the user would like to use skins or not.

Thursday, March 27, 2008 2:49 PM by ssmith

# Extract Control for ASP.NET in Visual Studio

I've been posting about some feature requests for ASP.NET/ Visual Studio , so here's one more in that

Tuesday, April 15, 2008 2:26 PM by Steven Smith

# Extract Control for ASP.NET in Visual Studio

I&#39;ve been posting about some feature requests for ASP.NET/ Visual Studio , so here&#39;s one more

Tuesday, April 15, 2008 3:16 PM by .Net World

# re: Three Requests for ASP.NET 4 and VS 2010

I would like to see the extensions expanded such that I can create them as shared methods within classes (VB.NET).  The fact they have to be created within Modules is a drag.

Monday, June 09, 2008 3:16 PM by Jason Vetter

# re: Three Requests for ASP.NET 4 and VS 2010

Do you have an opinion on how we can save the world before the year 2012?  

Can you develope a computer program that would predict the earth's condition, given the current conditions, extrapolated into the future?

Plse contact, Regards,

Gisele Champagne,

SavetheEarth2012@gmail.com

Tuesday, June 17, 2008 6:05 PM by Gisele Champagne

Leave a Comment

(required) 
required 
(required) 
Enter the code you see below