Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication2.WebForm1" %>
- <!DOCTYPE html>
- <script runat="server">
- protected void TextBox1_TextChanged(object sender, EventArgs e)
- {
- if (TextBox1.Text.Length == 0)
- { Button1.Enabled = false; }
- else
- {
- Button1.Enabled = true;
- }
- }
- </script>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title></title>
- </head>
- <body style="height: 517px">
- <form id="form1" runat="server">
- <asp:TextBox ID="TextBox1" runat="server" Height="26px" Width="458px" OnTextChanged =" TextBox1_TextChanged" ></asp:TextBox>
- <p>
- <asp:TextBox ID="TextBox2" runat="server" Height="26px" Width="457px" ></asp:TextBox>
- </p>
- <p>
- <asp:Button ID="Button1" runat="server" Height="32px" Text="Вычислить" Width="91px" OnClick="Button1_Click" Enabled ="false" />
- </p>
- <asp:Button ID="Button2" runat="server" Height="29px" Text="Отмена" Width="89px" OnClick="Button2_Click" />
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement