C# DataTable Operation: DataTable, DataRow

void getSession()
{
DataTable dt = new DataTable();
/// DataTable Definition
dt.Columns.Add("Session", typeof(string));
/// DataTable Row value Insert
DataRow dRow = dt.NewRow();
Int32 _Session = 2005;
for (Int32 i = 0; i 0)
{
ddlStartSession.DataTextField = "Session";
ddlStartSession.DataValueField = "Session";
ddlStartSession.DataSource = dt;
ddlStartSession.DataBind();

ddlEndSession.DataTextField = "Session";
ddlEndSession.DataValueField = "Session";
ddlEndSession.DataSource = dt;
ddlEndSession.DataBind();
}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s