narasiman rao

narasiman rao

  • NA
  • 519
  • 771.9k

how to store the datarow values into variables using C#

Apr 4 2013 7:02 AM


   how to store the datarow values into the variables using c#
 

My code as follows;
 
DataRow objRow;
objRow = objDt.NewRow();
 
objRow[0] = sCourse;
objRow[1] = sRate;
objRow[2] = ViewState["batchid"].ToString();
if (ViewState["temp"] == "P")
{
objRow[3] = ViewState["PackageID"];
}
else
{
objRow[3] = "";
objRow[4] = Convert.ToDateTime(ViewState["StDt"].ToString()); 
objRow[5] = Convert.ToDateTime(ViewState["EdDt"].ToString()); 
}
 
From my above code how to store the  objRow[4] and objRow[5]  values into the variables. And comparing objRow[4] date is greater than the objRow[5] date.
 
Please help me.how can i do using csharp.
 
Regards,
Rao.

Answers (1)