ASP.NET Page /History.aspx.cs (C#)
1: using System;  
2: using QuizNetOnline.Logic;  
3:   
4:   
5: public partial class History : QuiznetOnline.Web.UI.BusinessClasses.BasePage  
6: {  
7:     protected override void Page_Load(object sender, EventArgs e)  
8:     {  
9:         if (!Page.IsPostBack)  
10:         {  
11:             base.Page_Load(sender, e);  
12:             //if (ObjectDataSource1.SelectParameters.Count == 0)  
13:             //    ObjectDataSource1.SelectParameters.Add(new Parameter("UserName", TypeCode.String, User.Identity.Name));  
14:             //grdResults.DataBind();  
15:   
16:             string userName = ((UserWeb)Session["userWeb"]).UserName;  
17:   
18:             ObjectDataSource1.SelectParameters[0].DefaultValue = userName;  
19:   
20:         }  
21:     }  
22: }  

.NET Documentation Tool is © 2002 - 2009 Winnersh Triangle Web Solutions Limited.