if (GridView.ID = "GridView_ABC") {
// do this
}
else if (GridView.ID = "GridView_2") {
// do this
}
is this possible in some way?




Posted 23 July 2010 - 05:54 AM
if (GridView.ID = "GridView_ABC") {
// do this
}
else if (GridView.ID = "GridView_2") {
// do this
}
Posted 23 July 2010 - 07:12 AM
Posted 23 July 2010 - 07:29 AM
protected bool rowFromPrevMonth(GridViewRow r)
{
DateTime dt = DateTime.Now.AddMonths(-1);
string currentMonth = dt.ToString("MMMM");
string year = String.Format("{0:yyyy}", DateTime.Now);
prevMonth += " " + year;
string prev = ((HiddenField)r.Cells[2].FindControl("HiddenTime")).Value;
if (prevMonth == prev)
{
return true;
}
return false;
}
Posted 23 July 2010 - 07:35 AM
Posted 23 July 2010 - 07:51 AM
protected bool rowFromPrevMonth(string gvID, GridViewRow r)
{
if (gvID == "GridView_ABC") {
// do this
}
else if (gvID == "GridView_2") {
// do this
}
DateTime dt = DateTime.Now.AddMonths(-1);
string currentMonth = dt.ToString("MMMM");
string year = String.Format("{0:yyyy}", DateTime.Now);
prevMonth += " " + year;
string prev = ((HiddenField)r.Cells[2].FindControl("HiddenTime")).Value;
if (prevMonth == prev)
{
return true;
}
return false;
}
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
