fix: add member counter to "Practice.ValidWeb"
This commit is contained in:
parent
ee066855b6
commit
633c91bb72
@ -13,6 +13,7 @@ namespace ValidWeb
|
|||||||
protected void Button2_Click(object sender, EventArgs e)
|
protected void Button2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Session.Clear();
|
Session.Clear();
|
||||||
|
Label8.Text = "Dalyvių kiekis: 0";
|
||||||
for (int i = Table1.Rows.Count-1; i > 0; i--)
|
for (int i = Table1.Rows.Count-1; i > 0; i--)
|
||||||
{
|
{
|
||||||
Table1.Rows.RemoveAt(i);
|
Table1.Rows.RemoveAt(i);
|
||||||
|
@ -44,6 +44,8 @@
|
|||||||
<br />
|
<br />
|
||||||
<asp:Button ID="Button2" runat="server" Text="Išvalyti" OnClick="Button2_Click" />
|
<asp:Button ID="Button2" runat="server" Text="Išvalyti" OnClick="Button2_Click" />
|
||||||
<br />
|
<br />
|
||||||
|
<br />
|
||||||
|
<asp:Label ID="Label8" runat="server" Text="Dalyvių kiekis: 0"></asp:Label>
|
||||||
<br />
|
<br />
|
||||||
<asp:Table ID="Table1" runat="server" BackColor="#FFFFCC" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" GridLines="Both">
|
<asp:Table ID="Table1" runat="server" BackColor="#FFFFCC" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" GridLines="Both">
|
||||||
</asp:Table>
|
</asp:Table>
|
||||||
|
@ -24,6 +24,7 @@ namespace ValidWeb
|
|||||||
|
|
||||||
TableRow header = new TableRow();
|
TableRow header = new TableRow();
|
||||||
|
|
||||||
|
header.Cells.Add(new TableCell { Text = "<b>Nr</b>" });
|
||||||
header.Cells.Add(new TableCell { Text = "<b>Vardas</b>" });
|
header.Cells.Add(new TableCell { Text = "<b>Vardas</b>" });
|
||||||
header.Cells.Add(new TableCell { Text = "<b>Pavardė</b>" });
|
header.Cells.Add(new TableCell { Text = "<b>Pavardė</b>" });
|
||||||
header.Cells.Add(new TableCell { Text = "<b>Mokykla</b>" });
|
header.Cells.Add(new TableCell { Text = "<b>Mokykla</b>" });
|
||||||
@ -68,15 +69,15 @@ namespace ValidWeb
|
|||||||
{
|
{
|
||||||
TableRow row = new TableRow();
|
TableRow row = new TableRow();
|
||||||
|
|
||||||
|
row.Cells.Add(new TableCell { Text = Table1.Rows.Count.ToString() });
|
||||||
row.Cells.Add(new TableCell { Text = name });
|
row.Cells.Add(new TableCell { Text = name });
|
||||||
row.Cells.Add(new TableCell { Text = surname });
|
row.Cells.Add(new TableCell { Text = surname });
|
||||||
row.Cells.Add(new TableCell { Text = school });
|
row.Cells.Add(new TableCell { Text = school });
|
||||||
row.Cells.Add(new TableCell { Text = age });
|
row.Cells.Add(new TableCell { Text = age });
|
||||||
row.Cells.Add(new TableCell { Text = language });
|
row.Cells.Add(new TableCell { Text = language });
|
||||||
|
|
||||||
|
Label8.Text = String.Format("Dalyvių kiekis: {0}", Table1.Rows.Count);
|
||||||
Table1.Rows.Add(row);
|
Table1.Rows.Add(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
9
Practice/ValidWeb/Forma1.aspx.designer.cs
generated
9
Practice/ValidWeb/Forma1.aspx.designer.cs
generated
@ -194,6 +194,15 @@ namespace ValidWeb
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Button Button2;
|
protected global::System.Web.UI.WebControls.Button Button2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Label8 control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label Label8;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Table1 control.
|
/// Table1 control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
@ -72,8 +72,12 @@
|
|||||||
<Content Include="Web.config">
|
<Content Include="Web.config">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="WebForm1.aspx" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Forma1-clear.aspx.cs">
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Forma1.aspx.cs">
|
<Compile Include="Forma1.aspx.cs">
|
||||||
<DependentUpon>Forma1.aspx</DependentUpon>
|
<DependentUpon>Forma1.aspx</DependentUpon>
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
@ -82,6 +86,13 @@
|
|||||||
<DependentUpon>Forma1.aspx</DependentUpon>
|
<DependentUpon>Forma1.aspx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="WebForm1.aspx.cs">
|
||||||
|
<DependentUpon>WebForm1.aspx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="WebForm1.aspx.designer.cs">
|
||||||
|
<DependentUpon>WebForm1.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
|
15
Practice/ValidWeb/WebForm1.aspx
Normal file
15
Practice/ValidWeb/WebForm1.aspx
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ValidWeb.WebForm1" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
17
Practice/ValidWeb/WebForm1.aspx.cs
Normal file
17
Practice/ValidWeb/WebForm1.aspx.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace ValidWeb
|
||||||
|
{
|
||||||
|
public partial class WebForm1 : System.Web.UI.Page
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
26
Practice/ValidWeb/WebForm1.aspx.designer.cs
generated
Normal file
26
Practice/ValidWeb/WebForm1.aspx.designer.cs
generated
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ValidWeb
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public partial class WebForm1
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user