Advertisement
akass

Untitled

Dec 13th, 2014
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 1.23 KB | None | 0 0
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication2.WebForm1" %>
  2.  
  3. <!DOCTYPE html>
  4. <script runat="server">
  5.  
  6.     protected void TextBox1_TextChanged(object sender, EventArgs e)
  7.     {
  8.         if (TextBox1.Text.Length == 0)
  9.         { Button1.Enabled = false; }
  10.         else
  11.         {
  12.             Button1.Enabled = true;
  13.         }
  14.  
  15.     }
  16. </script>
  17.  
  18.  
  19. <html xmlns="http://www.w3.org/1999/xhtml">
  20. <head runat="server">
  21. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  22.     <title></title>
  23. </head>
  24. <body style="height: 517px">
  25.     <form id="form1" runat="server">
  26.         <asp:TextBox ID="TextBox1" runat="server" Height="26px"  Width="458px" OnTextChanged =" TextBox1_TextChanged" ></asp:TextBox>
  27.         <p>
  28.             <asp:TextBox ID="TextBox2" runat="server" Height="26px" Width="457px"  ></asp:TextBox>
  29.         </p>
  30.         <p>
  31.             <asp:Button ID="Button1" runat="server" Height="32px" Text="Вычислить" Width="91px" OnClick="Button1_Click" Enabled ="false"  />
  32.         </p>
  33.         <asp:Button ID="Button2" runat="server" Height="29px" Text="Отмена" Width="89px" OnClick="Button2_Click" />
  34.        
  35.  
  36.  
  37.  
  38.     </form>
  39. </body>
  40. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement