Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads
 
Add your own
alternative version

An Introduction to ASP.NET Dynamic Data from a Beginner's Perspective

By , 20 Aug 2012
DynamicDataTest.zip
DynamicDataTest
DynamicDataTest
App_Code
App_Data
testDb.mdf
testDb_log.ldf
bin
DynamicDataTest.dll
DynamicData
Content
Images
Back.gif
header_back.gif
PgFirst.gif
PgLast.gif
PgNext.gif
PgPrev.gif
plus.gif
CustomPages
EntityTemplates
FieldTemplates
Filters
PageTemplates
DynamicDataTest.csproj.user
Global.asax
LaptopDb.edmx
obj
Debug
edmxResourcesToEmbed
App_Code
TempPE
Properties
Scripts
using System;
using System.ComponentModel.DataAnnotations;
using System.Web.DynamicData;

namespace DynamicDataTest
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            System.Collections.IList visibleTables = Global.DefaultModel.VisibleTables;
            if (visibleTables.Count == 0)
            {
                throw new InvalidOperationException("There are no accessible tables. Make sure that at least one data model is registered in Global.asax and scaffolding is enabled or implement custom pages.");
            }
            Menu1.DataSource = visibleTables;
            Menu1.DataBind();
        }

    }
}

By viewing downloads associated with this article you agree to the Terms of use and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Rahul Rajat Singh
Software Developer (Senior)
India India
I Started my Programming career with C++. Later got a chance to develop Windows Form applications using C#. Currently using C#, ASP.NET & ASP.NET MVC to create Information Systems, e-commerce/e-governance Portals and Data driven websites.

My interests involves Programming, Website development and Learning/Teaching subjects related to Computer Science/Information Systems. IMO, C# is the best programming language and I love working with C# and other Microsoft Technologies.
Follow on   Twitter   Google+   LinkedIn

| Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 21 Aug 2012
Article Copyright 2012 by Rahul Rajat Singh
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid