Slide 10.8: User interface: NextPage.aspx
Slide 10.10: C#: Default.aspx.cs
Home

User Interface: NextPage.aspx (Cont.)


ASP.NET 4.7 (Visual Studio Community 2017) is different from ASP.NET 2.0 (Visual Web Developer 2005), but unlike ASP, the ASP.NET 2.0 applications/programs can still work on ASP.NET 4.7.

However, most ASP.NET tutorials such as ASP.NET QuickStart Tutorial still uses ASP.NET 2.0 or ASP.NET 1.0. Our ASP.NET class demonstrations will use ASP.NET 4.7, but the slide materials will use both ASP.NET 4.7 and 2.0.

The following HTML source code is retrieved by using Firefox option View Page Source by right clicking the mouse.

Simplified HTML Source of http://localhost:59004/NextPage.aspx
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
 <body>
  <form method="post" id="form1"
   action="NextPage.aspx?authorName=Luigi&email=luigi%40gmail.com&type=insert">
   <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
   <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
   <input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
   <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="BbS54..." />

   <script type="text/javascript">
    //<![CDATA[
     var theForm = document.forms['form1'];
     if (!theForm) {
      theForm = document.form1;
     }
     function __doPostBack(eventTarget, eventArgument) {
      if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
       theForm.__EVENTTARGET.value = eventTarget;
       theForm.__EVENTARGUMENT.value = eventArgument;
       theForm.submit();
      }
     }
    //]]>
   </script>

   <script src="/WebResource.axd?d=pynGkmcFUV13He1..." type="text/javascript">
   </script>
   <span id="Result">The author, Luigi, is inserted.</span>

   <input type="submit" name="Home" value="Home"
    onclick="javascript:WebForm_DoPostBackWithOptions(
     new WebForm_PostBackOptions(
     "Home", "", false, "", "Default.aspx", false, false))" id="Home" />
    <select name="authorList" onchange="javascript:setTimeout(
     '__doPostBack(\'authorList\',\'\')', 0)"
     id="authorList">
     <option value="Poke Mon">Poke Mon</option>
     <option value="Digi Mon">Digi Mon</option>
     <option value="Super Mario">Super Mario</option>
     <option value="Super Man">Super Man</option>
     <option selected="selected" value="Luigi">Luigi</option>
    </select>

   <table border="1">
    <tr><th>Author ID</th><th>Author Name</th><th>Email</th></tr>
    <tr><td>150</td><td>Luigi</td><td>luigi@gmail.com</td></tr>
   </table>

   <input type="hidden" name="__VIEWSTATEGENERATOR"
    id="__VIEWSTATEGENERATOR" value="92D6E260" />
   <input type="hidden" name="__PREVIOUSPAGE"
    id="__PREVIOUSPAGE" value="Hy7cIdBefXruBa..." />
   <input type="hidden" name="__EVENTVALIDATION"
    id="__EVENTVALIDATION" value="hCY20o+gt7O0..." />
  </form>

  <script type="application/json" id="__browserLink_initializationData">
   {"appName":"Firefox","requestId":"01a989c54ad..."}
  </script>
  <script type="text/javascript"
   src="http://localhost:7107/c8e89ffb.../browserLink" async="async">
  </script>
 </body>
</html>