petrpokorny
petrpokorny

Reputation: 71

ASP.NET QueryExtender parameter date format string

I would like to use QueryExtender control to retrieve records in a given date range.

<asp:QueryExtender ID="qeFilter" runat="server" TargetControlID="EntityDataSource1">
    <asp:RangeExpression DataField="Date" MaxType="Inclusive" MinType="Inclusive">
        <asp:ControlParameter ControlID="txtFrom" />
        <asp:ControlParameter ControlID="txtTo" />
    </asp:RangeExpression>
</asp:QueryExtender>

The problem is that date in text boxes is in "d.M.yyyy" format. I am unable to figure out how to specify the format for the asp:ControlParameter. Any ideas?

Upvotes: 1

Views: 1009

Answers (1)

petrpokorny
petrpokorny

Reputation: 71

I was able to solve the problem by setting the culture attribute for the page.

<%@ Page UICulture="cs" Culture="cs-CZ" %>

Here is more details: http://msdn.microsoft.com/en-us/library/bz9tc508.aspx

Upvotes: 2

Related Questions