Quantcast
Viewing all articles
Browse latest Browse all 12

Re: DataView RowFilter vs SQL WHERE

Yeah I didn't think it was that.

The StartDate and EndDate properties are actually in App_Code folder because I need them on multiple pages. The dvRowFilter posted is in the actual pages code behind file.

If I create a new property returning DateTime.MinValue in the pages code behind file, and call that property it works.

So, the fact my properties are in App_Code seems to be the problem:

App_Code:

public DateTime StartDate
{

	get { return _StartDate; }
	set { _StartDate = value; }

}

public DateTime EndDate
{

	get { return _EndDate; }
	set { _EndDate = value; }

}

Pages code behind:

dvRowFilter.Append(String.Concat("(", ColName, " >= '", StartDate, "' and ", ColName, " < '", EndDate, "')"));

Can you access properties from App_Code like this?


Viewing all articles
Browse latest Browse all 12

Trending Articles