Click here to Skip to main content
15,896,153 members
Articles / Web Development / ASP.NET

ASP.NET Scopes Framework: a powerful alternative to Forms and MVC

Rate me:
Please Sign up or sign in to vote.
4.87/5 (19 votes)
23 Nov 2010CPOL108 min read 81.2K   520   53  
This article introduces a brand-new web dev pattern and provides a framework based on it. It is a long-waited dev approach providing a unique and elegant solution to all Forms and MVC fundamental problems and bringing Web 2.0 site development task to a new level of flexibility and transparency.
<div scope="DialogWindow">
  <div style="height: 100%; width: 100%; position: fixed; left: 0pt; top: 0pt; z-index:100; opacity: 0.5;filter:alpha(opacity=50);background-color:Black;">
  </div>
  
  <div style="background-color: white;border:solid 1px black; width: 600px; height: 400px; display: block; position: fixed; left: 50%; top: 20%; margin-left: -300px;z-index:3000;overflow:hidden;">
      <div style="display:block; background-color:#800000; color:#FFFFFF; height: 22px;">
        <span style="float:left;font-weight:bold;">Student Information Dialog 1</span>
        <a style="float:right;color:#FFFFFF" href="javascript:AspNetScopes.Action('ClosePopup', 'dummy')">Close [X]</a>
      </div>
      <div scope="ContentView" style="display:block;margin:10px 10px 10px 10px;">
        <div scope="Profile">
          <table cellpadding="2px" border="0px" cellspacing="2px">
             <tr><td align="right" style="background-color: #808080; font-weight: bold;">Name:</td><td style="background-color: #CCCCCC">&nbsp;{StudentName}</td></tr>
             <tr><td align="right" style="background-color: #808080; font-weight: bold;">SSN:</td><td style="background-color: #CCCCCC">&nbsp;{StudentSSN}</td></tr>
             <tr><td align="right" style="background-color: #808080; font-weight: bold;">Major:</td><td style="background-color: #CCCCCC">&nbsp;{Major}</td></tr>
             <tr><td align="right" style="background-color: #808080; font-weight: bold;">Phone:</td><td style="background-color: #CCCCCC">&nbsp;{PhoneNumber}</td></tr>
             <tr><td align="left" colspan="2" style="padding: 10px; background-color: #CCCCCC">Student enrolled in {CourseCount} course(s)</td></tr>
          </table>
        </div>
        <div scope="Summary" style="background-color: #FFFFFF; margin-top: 10px; font-style: italic;">
          Displaying courses from {FromCourse} to {ToCourse}
        </div>
        <div scope="CourseRepeater" style="height: 120px; background-color: #CCCCCC;">
          <table cellpadding="2px" border="0px" cellspacing="2px" width="100%" bgcolor="White">
            <tr>
              <td style="font-weight: bold; background-color: #808080">Course ID</td>
              <td style="font-weight: bold; background-color: #808080">Full Name</td>
              <td style="font-weight: bold; background-color: #808080">Time</td>
            </tr>
            <!--scope-from-->
            <tr>
              <td style="background-color: #CCCCCC">{CourseID}</td>
              <td style="background-color: #CCCCCC">{CourseFullName}</td>
              <td style="background-color: #CCCCCC">{StartTime} - {EndTime}</td>
            </tr>
            <!--scope-stop-->
          </table>
        </div>
        <div scope="Pager" style="background-color: #CCCCCC; margin-top: 2px;padding:5px;" />
      </div>
      <div scope="LoaderView" style="background-position: center center; display:block; height:355px; background-color: #CCCCCC; margin:10px 10px 10px 10px; background-image: url('res/Image/ajax-loader.gif'); background-repeat: no-repeat;">
        &nbsp;
        <div style="display:block;margin-top:190px;text-align:center;">please wait ...</div>
      </div>
  </div>
</div>

<script language="javascript" type="text/javascript">
  AspNetScopes.AddRefreshHandler("{CurrScopeID}", function()
  {
    var $loader = $("#{CurrScopeID}").find("[id$=LoaderView]");
    if ($loader.length > 0) setTimeout("AspNetScopes.Action('DelayedLoad', 'dummy')", 100);
    Sys.Debug.trace("Refresh handler invoked: {CurrScopeID}");
  });
</script>

By viewing downloads associated with this article you agree to the Terms of Service 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)


Written By
Software Developer (Senior)
Canada Canada
Software Architect with over 15 years in IT field. Started with deep math and C++ Computer Vision software. Currently in .NET and PHP web development. Creator of DaST pattern, open-source frameworks, and plugins. Interested in cutting Edge IT, open-source, Web 2.0, .NET, MVC, C++, Java, jQuery, Mobile tech, and extreme sports.

Comments and Discussions