Advertisement
Guest User

balexandre

a guest
Feb 27th, 2010
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.23 KB | None | 0 0
  1. <%@ Page Language="C#" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <script runat="server">
  6.  
  7.     protected void LinkButton1_Click(object sender, EventArgs e)
  8.     {
  9.         Label1.Text = "Hello from Link";
  10.     }
  11.  
  12.     protected void Button1_Click(object sender, EventArgs e)
  13.     {
  14.         Label1.Text = "Hello from Button";
  15.     }
  16.    
  17. </script>
  18.  
  19. <html xmlns="http://www.w3.org/1999/xhtml">
  20. <head runat="server">
  21.     <title></title>
  22. </head>
  23. <body>
  24.     <form id="form1" runat="server">
  25.     <div>
  26.         <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">ASP.NET LinkButton</asp:LinkButton>
  27.         <br />
  28.         <br />
  29.         <asp:Button ID="Button1" runat="server" Text="ASP.NET Button" OnClick="Button1_Click" />
  30.         <br />
  31.         <br />
  32.         <input type="button" id="btn" value="HTML Button" onclick="PostButton();" />
  33.         <br />
  34.         <br />
  35.         <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
  36.     </div>
  37.  
  38.     <script type="text/javascript">
  39.         function PostButton() {
  40.             __doPostBack('Button1', '');
  41.         }
  42.     </script>
  43.  
  44.     </form>
  45. </body>
  46. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement