ASPX templates
Version 6.x > ASPX templates > "and", "or" in WhereCondition property View modes: 
User avatar
Member
Member
hungquang_itsyad-yahoo.com - 10/11/2012 9:08:46 PM
   
"and", "or" in WhereCondition property
In my code behind:

protected void Page_Load(object sender, EventArgs e)
{
mainMenu.StopProcessing = false;
mainMenu.WhereCondition = "NodeID != 1282" and "NodeID != 1287";
mainMenu.ReloadData(true);
}


I using WhereCondition with many condition, but I can't using "and", "or"...

How do I do that?

Thank!

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/12/2012 1:51:54 AM
   
RE:"and", "or" in WhereCondition property
Hi,

Have you tried using it as a normal SQL where condition? The property is s string type, so you need to pass the condition string like this:

"NodeID != 1282 AND NodeID != 1287";

Best regards,
Juraj Ondrus

User avatar
Member
Member
hungquang_itsyad-yahoo.com - 10/12/2012 3:21:20 AM
   
RE:"and", "or" in WhereCondition property
Hi,

Thank Juraj Ondrus.