ASP.NET: Html Server Controls e gli eventi - Codice sorgente dell’esempio

htmlAnchor.aspx - Prova l’esempio [nuova finestra]

  1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3 
  4 <%@Page Language="VB"%>
  5 <%@Register TagPrefix="ANet" TagName="Footer" Src="includes/footer.ascx"%>
  6 
  7 <!
  8 # nome: HtmlAnchor.aspx
  9 # scritto da: Antonio Volpon
 10 # data creazione: 25 Ottobre 2001
 11 # ultima modifica: 25 Ottobre 2001
 12 # copyright: Antonio Volpon
 13 >
 14 
 15 <script language="vb" runat="server">
 16 
 17 Sub Page_Load(sender as Object, e as EventArgs)
 18   link.HRef = "http://www.fucinaweb.com"
 19   link.Title = "La pagina di ingresso di FucinaWeb.com"
 20   link.Target = "_blank"
 21 End Sub
 22 
 23 Sub linkevento_Click(Source As Object, E as EventArgs)
 24    risposta.InnerHtml = "Bravo, hai cliccato!"
 25 End Sub
 26 
 27 </script>
 28 
 29 <html>
 30   <head>
 31     <link rel="stylesheet" href="css/aspnet.css" type="text/css">
 32     </link>
 33     <title>Gli HtmlControls: HtmlAnchor</title>
 34   </head>
 35   <body>
 36     <div class="titolo">
 37       Gli HtmlControls: HtmlAnchor
 38     </div>
 39     
 40     <hr noshade="true" size="1" width="100%" />
 41 
 42     <!– Esempio "link da seguire" –>
 43       
 44     <p>Clicca sul link per caricare una pagina di esempio.</p>
 45 
 46 
 47     <a id="link" runat="server">
 48       Home Page di FucinaWeb.com
 49     </a>
 50 
 51     <br /><br />
 52     <hr noshade="true" size="1" width="100%" />
 53     
 54     <!– Esempio "eventi in postback" –>
 55 
 56    <form method="post" runat="server">
 57 
 58     <p>Oppure qui per un…</p>
 59     
 60  <a OnServerClick="linkevento_Click" runat="server" id="linkevento">…esempio di postback</a>
 61      
 62      <br /><br /><br />
 63      
 64  <div id="risposta" class="risposta" runat="server"></div>
 65 
 66  </form>
 67 
 68  <ANet:Footer id="Menu" runat="server" />
 69 
 70   </body>
 71 </html>

Tag: , ,
  • ASP.NET: Html Server Controls e gli eventi
    Ecco i controlli che consentono di sfruttare la programmazione ad oggetti in ASP.NET e che sono in corrispondenza 1:1 con i tag Html. Il server ASP.NET si preoccuperà di convertirli in puro codice Html, ma il programmatore potrà usarli efficacemente da codice...
  • ASP.NET: Web Form Controls e gli eventi - Codice sorgente dell’esempio
    Sorgenti: TextBox.aspx Scarica i sorgenti: aspnet05.zip Articolo a cui si riferisce il codice: ASP.NET: Web Form Controls e gli eventi TextBox.aspx - Prova l’esempio [nuova finestra]   1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   2   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   3    4 <%@Page Language="VB"%>   5 <%@Register TagPrefix="ANet" TagName="Footer" Src="includes/footer.ascx"%>   6    7 <!–   8 # nome: TextBox.aspx   9 # scritto da: Antonio...
  • ASP.NET: Validation Controls - Controllare l’input dell’utente - Codice sorgente dell’esempio
    Sorgenti: RequiredFieldValidator.aspx Scarica i sorgenti: aspnet06.zip Articolo a cui si riferisce il codice: ASP.NET: Validation Controls RequiredFieldValidator.aspx - Prova l’esempio [nuova finestra]   1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   2   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   3    4 <%@Page Language="VB"%>   5 <%@Register TagPrefix="ANet" TagName="Footer" Src="includes/footer.ascx"%>   6    7    8 <!–   9 # nome: RequiredFieldValidator.aspx  10 # scritto da: Antonio Volpon  11 # data...
  • ASP.NET: Server Roundtrip e ViewState - Codice sorgente dell’esempio
    Sorgenti: viewState.aspx Scarica i sorgenti: aspnet03.zip Articolo a cui si riferisce il codice: ASP.NET: Server Roundtrip e ViewState viewState.aspx - Prova l’esempio [nuova finestra]   1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   2   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   3    4 <%@Page Language="VB"%>   5 <%@Register TagPrefix="ANet" TagName="Footer" Src="includes/footer.ascx"%>   6    7 <!–   8 # nome: ViewState.aspx   9 # scritto da: Antonio Volpon  10 #...
  • ASP.NET: i List Controls - Lavorare con gli insiemi di dati - Codice sorgente dell’esempio
    Sorgenti: singleValueBinding.aspx - repeatedValueBinding.aspx Scarica i sorgenti: aspnet08.zip Articolo a cui si riferisce il codice: ASP.NET: Single Value e Repeated Data Binding singleValueBinding.aspx - Prova il primo esempio [nuova finestra]   1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   2   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   3    4 <%@Page Language="VB"%>   5 <%@Register TagPrefix="ANet" TagName="Footer" Src="includes/footer.ascx"%>   6    7 <!–   8 # nome: SingleValueBinding.aspx...

Scrivi un commento

Non è possibile inserire commenti per questo intervento.