Hello all, I'd like to add some dynamic data functionalities in my ASP.NET 4.0 web application, so I added a New Item -> Dynamic Data Field, and I obtain the folder Field Templates -> DynamicDataField1.ascx and DynamicDataField1_Edit.ascx
Now how can I start?
Has anyone a tutorial link from whom I can learn something?
Hi Luigi, you need at least a strongly typed class top even use Simple DD (GridView.EnableDynamicData()) David Ebbo Has a sample of using the Object Data source in the old futures project here
Dynamic Data Futures VS2008 SP1 RTMand some samples for using other data sources here
Dynamic Data 4.0 Samples
See my blog C# Bits | Twitter @sjnaughton Always seeking an elegant solution.
But what about all the other old pages transported into this? Will all they behave the same? What about your old code? Will it be discarded or substituted? What's the advantage of doing this if that were possible at all? What's the idea of merging two different
development environments? Isn't taht counter prodcuctive? What do you win doing this? Isn't it risky? What code prevails old or new? This idea looks nuts for beginners
ciupazMI
Member
140 Points
172 Posts
Starting with adding a Dynamic Data Field in an existing ASP.NET 4.0 Web Application
Feb 22, 2012 07:24 PM|LINK
Hello all, I'd like to add some dynamic data functionalities in my ASP.NET 4.0 web application, so I added a New Item -> Dynamic Data Field, and I obtain the folder Field Templates -> DynamicDataField1.ascx and DynamicDataField1_Edit.ascx
Now how can I start?
Has anyone a tutorial link from whom I can learn something?
Thanks in advance.
Luigi
sjnaughton
All-Star
27391 Points
5485 Posts
MVP
Re: Starting with adding a Dynamic Data Field in an existing ASP.NET 4.0 Web Application
Feb 22, 2012 11:14 PM|LINK
On your GridView DetailsView or FormView use the Extension Methode
you should be good, you wont get ForeignKey field though you need to add full DD to your dite for that and register the model.
Always seeking an elegant solution.
ciupazMI
Member
140 Points
172 Posts
Re: Starting with adding a Dynamic Data Field in an existing ASP.NET 4.0 Web Application
Feb 23, 2012 08:12 AM|LINK
So I have to add an Entity Data Model too?
Luigi
sjnaughton
All-Star
27391 Points
5485 Posts
MVP
Re: Starting with adding a Dynamic Data Field in an existing ASP.NET 4.0 Web Application
Feb 23, 2012 08:41 AM|LINK
only if you want ForeignKey relationships, what data model are you using?
Always seeking an elegant solution.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Starting with adding a Dynamic Data Field in an existing ASP.NET 4.0 Web Application
Feb 24, 2012 12:54 AM|LINK
Hello ciupazMI:)
I strongly suggest you having a clear look at http://www.asp.net/web-forms/videos/aspnet-dynamic-data,this is a whole,complete ASP.NET Dynamic Data Torturial。
If you've known more about this,plz look at:http://davidhayden.com/blog/dave/archive/2008/01/03/CreatingCustomDynamicDataFieldsASPNETDynamicDataWebsites.aspx
ciupazMI
Member
140 Points
172 Posts
Re: Starting with adding a Dynamic Data Field in an existing ASP.NET 4.0 Web Application
Feb 24, 2012 07:29 AM|LINK
Thanks Deker, I'll try to study these videos.
Luigi
ciupazMI
Member
140 Points
172 Posts
Re: Starting with adding a Dynamic Data Field in an existing ASP.NET 4.0 Web Application
Feb 24, 2012 07:30 AM|LINK
I have no Data Model until now, just plain ADO.NET (DataTable, DataReader and so on).
Luigi
sjnaughton
All-Star
27391 Points
5485 Posts
MVP
Re: Starting with adding a Dynamic Data Field in an existing ASP.NET 4.0 Web Application
Feb 24, 2012 10:37 AM|LINK
Hi Luigi, you need at least a strongly typed class top even use Simple DD (GridView.EnableDynamicData()) David Ebbo Has a sample of using the Object Data source in the old futures project here Dynamic Data Futures VS2008 SP1 RTMand some samples for using other data sources here Dynamic Data 4.0 Samples
Always seeking an elegant solution.
ciupazMI
Member
140 Points
172 Posts
Re: Starting with adding a Dynamic Data Field in an existing ASP.NET 4.0 Web Application
Feb 24, 2012 01:28 PM|LINK
Thank you sjn
master_bait
Member
48 Points
39 Posts
Re: Starting with adding a Dynamic Data Field in an existing ASP.NET 4.0 Web Application
Mar 02, 2012 05:01 AM|LINK
But what about all the other old pages transported into this? Will all they behave the same? What about your old code? Will it be discarded or substituted? What's the advantage of doing this if that were possible at all? What's the idea of merging two different development environments? Isn't taht counter prodcuctive? What do you win doing this? Isn't it risky? What code prevails old or new? This idea looks nuts for beginners
Yules