asp where parameter for linq query

Here is my scenario.  I have an aspx webpage that has a dropdown in the form.  I am populating the dropdown with a view that is in my dataclasses file.  This view is just a list of years, but for the particular form I am using i need to filter the results of that view.  From the dropdown i have configured a linqdatasource.  in that wizard i selected to add some parameters to the where clause.  this works as expected when specifing year less than 2000 and greater than 1955; however, what i need to do is include all years less than current year - 9 and greater than current year - 50.  

what i think i should be able to do is something similar to select year(getdate())-9 as the default value; however, when doing so i get an error "Input string was not in a correct format"

please advise.  
<asp:DropDownList ID="BirthYear" runat="server" AppendDataBoundItems="True" 
        Width="180px" DataSourceID="LinqDataSource_DropDown_BirthYear" DataTextField="intYear" 
        DataValueField="intYear">
            <asp:ListItem Selected="True" Value="0">Choose One</asp:ListItem>
            
        </asp:DropDownList>
        <asp:LinqDataSource ID="LinqDataSource_DropDown_BirthYear" runat="server" 
        ContextTypeName="AIS_artinstructionschools.edu.DataClassesDataContext" 
        Select="new (intYear)" TableName="viewDropDown_Years" 
        Where="intYear &lt; @intYear &amp;&amp; intYear &gt; @intYear1">
            <WhereParameters>
                <asp:Parameter DefaultValue="2000" Name="intYear" Type="Int32" />
                <asp:Parameter DefaultValue="1955" Name="intYear1" Type="Int32" />
            </WhereParameters>
    </asp:LinqDataSource>

Open in new window

rugby148Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rugby148Author Commented:
I found a solution.  i did not need to use the parameter.  I could just put what i needed in the where property of the linkdatasource.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.