Advertisement
thebys

kalendář se selekcí

Apr 27th, 2011
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.27 KB | None | 0 0
  1. <%@ Page Language="C#"%>  
  2. <script  runat="server">
  3. public void submit(object Source, EventArgs e){
  4. bsubmit.Text = "odesláno";
  5. }
  6. public void calchange(object Source, EventArgs e){
  7.     if (databox1.Items.FindByText(cal1.SelectedDate.ToShortDateString()) == null)
  8.     {
  9.     databox1.Items.Add(cal1.SelectedDate.ToShortDateString());  
  10.     }
  11.     else
  12.     {
  13.     databox1.Items.Remove(databox1.Items.FindByText(cal1.SelectedDate.ToShortDateString()));    
  14.     }
  15. }
  16. </script>
  17.  
  18. <!DOCTYPE html>
  19. <html lang="en">
  20.     <head>
  21.         <meta charset="utf-8" />
  22.         <title>Natáčecí kalendář projektu Cosa nostra</title>
  23.     </head>
  24.     <body>
  25.         <form id="form1" runat="server">
  26.         <div>
  27. Login: <asp:TextBox id="login" width=150px runat=server /><br/>
  28. heslo pro editaci: <asp:TextBox id="heslo" TextMode="password" width=80px runat=server /><br/><br/>
  29. Dny kdy nemůžete: <asp:Calendar id="cal1" OnSelectionChanged="calchange"  runat=server /><br/>
  30.  
  31.             <asp:ListBox id="databox1" enabled="false" runat="server" width=150px heigth=550px>            
  32.  
  33.                 </asp:ListBox><br/>
  34.            
  35.             <asp:Button id="bsubmit" text="odeslat" OnClick="submit" runat="server" />      
  36.             </div>
  37.         </form>
  38.     </body>
  39. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement