timesheet in asp.net C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • parshupooja
    New Member
    • Jun 2007
    • 159

    timesheet in asp.net C#

    Hi

    I am trying to create a timesheet for about 100 users. I want to display spmething like this

    day date In Out In Out total

    sat 01/10/2007 textboxes

    sun 01/11/2007

    ----------so on for entire2 weeks

    I am unable to figure out how should I display this and than update. I tried using this in page load but it display current date and day and text boxes for 14 times
    Code:
    protected void Page_Load(object sender, EventArgs e) 
    {
    
    //build placeholder
    
    for (int x = 0; x <= 14; x++) 
    {
    
    Label day = new Label(); 
    day.ID = "day" + x.ToString();
    
    Label title = new Label(); 
    title.ID = "Item " + x.ToString();
    
    TextBox txt = new TextBox();txt.ID = "txt" + x.ToString(); 
     
    
    title.Text = DateTime.Now.Date.AddDays(1).ToShortDateString();
    
    day.Text = DateTime.Now.DayOfWeek.ToString(); 
     
    
    Area1.Controls.Add(day);
    
    Area1.Controls.Add(new LiteralControl(" ")); 
    Area1.Controls.Add(title);
    
    Area1.Controls.Add(txt);
    
    Area1.Controls.Add(new LiteralControl("<br>")); 
    } 
    
    }
    
    
    plz help
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    #2
    Wondered if you could fit the data in a gridview?

    Comment

    Working...