Ok, link is fixed, thanks.
To give it some context, the database of the example has only a single table named List:
List:
Id (PK, int, not null)
Name (nvarchar(max), not null)
IsComplete (bit, not null)
Priority (int, not null)
DataCreated (datetime, not null)
Thanks for your comments. You've given me a different perspective on my original question. After considering what you said, it turns out your answer is 100% complete! My thinking that the "-1" represented null and "-2" represented something else was way off. It's actually exactly as you said: they're using 0, 1, -1, and -2 to represent different buttons as can be seen in the aspx code (check the CommandArgument values):
<div class="tabs">
<span class="controlLabel">Show:</span>
<asp:LinkButton ID="ActiveButton" Text="Active" CommandName="show" CommandArgument="0" OnCommand="Select_Command" runat="server" />
<asp:LinkButton ID="CompletedButton" Text="Completed" CommandName="show" CommandArgument="1" OnCommand="Select_Command" runat="server" />
<asp:LinkButton ID="AllButton" Text="All" CommandName="show" CommandArgument="-1" OnCommand="Select_Command" runat="server" />
<span class="controlLabel leftSpace">Search:</span>
<span id="SearchTab" runat="server">
<asp:TextBox ID="SearchText" CssClass="filterdropdown" Width="150px" runat="server" />
<asp:Button ID="SearchBtn" CssClass="topButtons" Text=" >> "
CommandName="search" CommandArgument="-2" OnCommand="Select_Command" runat="server" />
</span>
</div>
And in the code behind to handle the actions:
protected void Select_Command( object sender, CommandEventArgs e )
{
ListDataSource.SelectParameters[ "IsComplete" ].DefaultValue = e.CommandArgument.ToString();
if ( e.CommandName == "show" ) SearchText.Text = "";
ViewState[ "CurrentTab" ] = e.CommandArgument;
}
Next challenge for me is to figure out how to make this happen using LLBLGen Pro.
Thanks again,
JC