Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- namespace WebApplicationDemo
- {
- public partial class Popravka : System.Web.UI.Page
- {
- // 1
- protected void Page_Load(object sender, EventArgs e)
- {
- Calendar1.Visible = false;
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- if (TextBox1.Text == "Календар")
- {
- Calendar1.Visible = true;
- }
- else
- {
- TextBox1.Text = "Въведете текст - Календар";
- }
- }
- // 2
- protected void Calendar1_SelectionChanged(object sender, EventArgs e)
- {
- var date = Calendar1.SelectedDate;
- for (int i = 0; i <= 7; i++)
- {
- ListBox1.Items.Add(new ListItem(date.ToShortDateString()));
- date = date.AddDays(1);
- }
- }
- // 4
- protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
- {
- Session["destinationType"] = DropDownList1.SelectedValue;
- Response.Redirect("PopravkaPage2.aspx");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement