I need asp calendar to open in customer culture, not in server culture.


Hi experts!

I’m new to AJAX and ASP.NET and I need a little help. Look on pic.
I want to set calendar to be with culture of user’s WEB browser, not with culture of server.

I try with his code, it  work but only when result of calendar are return to textbox. I want display of calendar to be in language of user. How can I produce this ?

If this is not possible with standard calendar, I’m ready to change it with other control. Free if is possible.

Here is my code now:
                <asp:TextBox ID="txtDate" runat="server" CssClass="txt" Width="110px"></asp:TextBox>
                <asp:CalendarExtender ID="txtDate_CalendarExtender" runat="server"
                    TargetControlID="txtDate">
                </asp:CalendarExtender>


And I do this in code- behind:

        protected void Page_Load(object sender, EventArgs e)
        {

            if (!Page.IsPostBack)
            {
                CustomerCI = System.Globalization.CultureInfo.CreateSpecificCulture(Request.UserLanguages[0]);


                txtDate.Text = DateTime.Now.ToString(CustomerCI.DateTimeFormat.ShortDatePattern);


                txtDate_CalendarExtender.Format = CustomerCI.DateTimeFormat.ShortDatePattern;


             
            }
       
        }

But nommater of this line
txtDate_CalendarExtender.Format = CustomerCI.DateTimeFormat.ShortDatePattern;

when calndar is open it show data in server culture, not in user culture. That is problem which I should solve.


Thanks.

culture.JPG
dvplayltdAsked:
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.

bedanandCommented:
Hi,

Try using ScriptManager enablescriptglobalization=true  and settings page culture to browsers culture.


see this
http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.enablescriptglobalization.aspx


Thanks
Bedanand
dvplayltdAuthor Commented:
To bedanand

I already do it , but do not have effect. enablescriptglobalization=true, may be I need to set also other properties?
bedanandCommented:
did u set the page culture to browsers culture.

seet this.
http://msdn.microsoft.com/en-us/library/bz9tc508(VS.80).aspx

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
dvplayltdAuthor Commented:
10x. I set this and now is working!
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
ASP.NET

From novice to tech pro — start learning today.