ivana_andreevska

АВ2 Задача 4

Mar 10th, 2022 (edited)
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.72 KB | None | 0 0
  1. <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="AV2.WebForm1" %>
  2. <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
  3.     <div class="container-fluid">
  4.  
  5.         <div class="row text-center ">
  6.  
  7.             <div class="m-4">
  8.                 Внесете име на валута
  9.                 <br />
  10.                 <asp:TextBox ID="ImeValuta" runat="server"></asp:TextBox>
  11.             </div>
  12.  
  13.             <div class="m-4">
  14.                 Внесете вредност на валута
  15.                 <br />
  16.                 <asp:TextBox ID="VrednostValuta" runat="server"></asp:TextBox>
  17.             </div>
  18.                
  19.             <div class="m-4">
  20.                 <asp:Button ID="DodadiValuta" runat="server" Text="Додади Валута" OnClick="DodadiValuta_Click" />
  21.             </div>
  22.  
  23.             <hr />
  24.  
  25.             <div class="m-4">
  26.                 <asp:RadioButtonList ID="ListaValuti" runat="server"></asp:RadioButtonList>
  27.             </div>
  28.  
  29.         </div>
  30.  
  31.     </div>
  32. </asp:Content>
  33.  
  34.   using System;
  35. using System.Collections.Generic;
  36. using System.Linq;
  37. using System.Web;
  38. using System.Web.UI;
  39. using System.Web.UI.WebControls;
  40.  
  41. namespace AV2
  42. {
  43.     public partial class WebForm1 : System.Web.UI.Page
  44.     {
  45.         protected void Page_Load(object sender, EventArgs e)
  46.         {
  47.  
  48.         }
  49.  
  50.         protected void DodadiValuta_Click(object sender, EventArgs e)
  51.         {
  52.             ListItem item = new ListItem(ImeValuta.Text, VrednostValuta.Text);
  53.             ListaValuti.Items.Add(item);
  54.             ImeValuta.Text = "";
  55.             VrednostValuta.Text = "";
  56.         }
  57.     }
  58. }
Add Comment
Please, Sign In to add comment