Web Forms :: How To Force Gregorian DateTime In Arabic Culture

Jul 17, 2015

I am showing the pages in English and Arabic using Local Resources in my website. My problem is that in English Page DateTime is showing in Gregorian date and in Arabic Pages it is showing in Hijri date. I want to show Gregorian date in both English and Arabic Pages.

View 1 Replies


Similar Messages:

Data Controls :: How To Force Gregorian (English) DateTime In Arabic Culture In GridView

Jul 17, 2015

<asp:TemplateField HeaderText="" meta:resourcekey="PStartTime" ItemStyle-CssClass="cssItemStyle" HeaderStyle-CssClass="cssItemStyle">
  <ItemTemplate>
     <asp:Label ID="lblPStartTime" runat="server" Text='<%#Eval("PStartTime")%>'></asp:Label>
  </ItemTemplate>
  <ItemStyle Width="25%" Height="30px" HorizontalAlign="left" />
</asp:TemplateField>

I am showing the pages in English and Arabic using Local Resources in my website. I want to show Gregorian date time in Gridview  in both English and Arabic Pages(ar-SA). How I will do it,

View 1 Replies

Web Forms :: Display Date In Gregorian Datetime Format Using C#?

Nov 22, 2015

How can I get date in the format 2015-09-23T10:24:22.940+01:00 as a datetime and not string, in c#.

View 1 Replies

Localization :: How To Get Culture Info Or Just Culture Name From The Datetime String

Apr 7, 2010

how can to get culture info or just culture name from the datetime string e.g i have strings like: "16/02/2008" or "23/02/2008 " can i know the culture name from the above datetime strings?

View 3 Replies

Pares Datetime From One Culture To Another?

Feb 18, 2010

i want to parse a datetime from one culture to another but i am getting exception "String was not recognized as a valid DateTime". I have already tried the follwoing code:

DateTime creationTime = DateTime.Parse("16/02/2010 12:37:27", CultureInfo.CreateSpecificCulture("en-US"));
DateTime creationTime = DateTime.Parse("16/02/2010 12:37:27", CultureInfo.CreateSpecificCulture(CultureInfo.CurrentCulture.Name));
DateTime creationTime = DateTime.Parse("16/02/2010 12:37:27", CultureInfo.InvariantCulture);

My current culture is united states i am getting the date sting in UK format then plz any idea how can i convert it without hard coding like this: DateTime creationTime = DateTime.Parse("16/02/2010 12:37:27", CultureInfo.CreateSpecificCulture("en-GB"));

View 4 Replies

C# - DateTime.Parse, Latvian Culture Settings?

Dec 1, 2010

I am sending in a string in dd/MM/yyyy format, which is then being parsed into lv-LV culture as set per the web.config globalization setting.I am then comparing the date to DateTime.Now to see if it is in the past.The problem is, DateTime.Parse converts my string to dd.MM.yyyy format, but DateTime.Now has MM.dd.yyyy format, so the comparison always fails.Why would DateTime.Now be different to the output from DateTime.Parse, on the same thread culture?(Update) This is the code I am using:InputText contains input from a form in DD.MM.YYYY format

DateTime date = DateTime.Parse(InputText, CultureInfo.CurrentCulture);
// Check it's not in the past
this.IsValid = (date.CompareTo(DateTime.Now) > 0);

[DateTime.Now] in this context is in MM.DD.YYYY format using lv-LV cultureInfo
[date] is in DD.MM.YYYY format after the DateTime.Parse

View 2 Replies

C# - How To Create A DateTime Object Not In The Current Culture?

Jul 29, 2010

I'm really drawing a blank on this one. I've been working on globalization but the DateTime seems to always revert back to the CurrentThread's culture.

I've got a textbox with the date expressed as a string:

// the CurrentThread's culture is de-DE
// My test browser is also set to de-DE
IFormatProvider culture = new System.Globalization.CultureInfo("de-DE",
true);
// en-US culture, what I'd ultimately like to see the DateTime in
IFormatProvider us_culture = new System.Globalization.CultureInfo("en-US",
true);
// correctly reads the textbox value (22.7.2010 into a datetime)
DateTime dt= DateTime.Parse(txtStartDate.Text, culture,
System.Globalization.DateTimeStyles.NoCurrentDateDefault);
// correctly produces a string 7/22/2010
string dt2 = dt.ToString(us_culture);

At this point I want a DateTime that's in en-US I've tried both:

DateTime dt3 = Convert.ToDateTime(dt2, us_culture);
DateTime dt3 = DateTime.Parse(dt2, us_culture);

But both produce de-DE DateTimes. My motivation in asking this question is the rest of the business logic is going to be calling dt2.toString() and will result in an incorrect date time string. I realize I could change toString() to be toString(us_culture) but I'd rather not change all of the rest of the business logic to accomodate this change.

Is there a way to get a DateTime in a culture other than the CurrentThread's culture?

View 3 Replies

Date Or DateTime Object To Be Independent Of Page Culture

Dec 28, 2010

Dim strTime as String = FomatDateForSave("28/12/2010")
Public Shared Function FormatDateForSave(ByVal strDate As String) As Date
FormatDateForSave = Date.ParseExact(strDate,'dd/MM/yyyy', System.Globalization.CultureInfo.InvariantCulture)
End Function

I am expecting strTime to be "12/28/2010" .... But its getting converted to "28/12/2010" The thing is when the operation is performed by FormatDateForSave ... it converts it to "12/28/2010" But when it is returned it is again converted to "12/28/2010"

I have set the Date for Page.Culture to be "dd/mm/yyyy" and want the value to be "mm/dd/yyyy" to be saved in DB.

View 2 Replies

Web Forms :: How To Make The Error Message To Be Appeared In Arabic When The Arabic Button Is Selected

Mar 18, 2010

As i am using asp validation and they are working fine,my next issue is how to make appear the requiredfield validator into arabic as well,because i am developing multilanguage webisite n now how can i make the error message to be appeared in arabic when
the arabic button is selected

< asp:RequiredFieldValidator
ID="RequiredFieldValidator1"
runat="server" [code]...

View 8 Replies

Forms Data Controls :: How To Set The Display Culture Of A "System.Web.UI.WebControls.Calendar" To Use A Specific Culture

Jun 1, 2010

I created a custom clander server control basing on "System.Web.UI.WebControls.Calandar" and when i change the culture from login Screen (Ex:- Spanish) i am setting only the UI Culture in the page base class. When i had the Both "CurrentUICulture" and "CurrentCulture" set i could see the Day (Mon Tue) of the my custcalander control in the corresponding culture, but when i commented out i see them in English only (not in the corresponding culture set while loggin in. The reason why i commented out the "CurrentCulture" was that when i set this the middle tier or code behind files also running in this culture (as we are setting on the CurrentThread culture) and causing decimal data coming in this culture (Ex:- spain) and so on. So i only set the "CurrentThread.CurrentUICulture" only to corresponding culture and not the "Thread.CurrentThread.CurrentCulture". Is there a way to acheive this, i mean How to make the Day (Ex:- Mon, Tue, Wed) in the corresponding culture with out setting "Thread.CurrentThread.CurrentCulture"?

/// <summary>
/// Current selected culture
/// </summary> [code]....

View 3 Replies

Databases :: Getting Error While running Application /Could Not Find Any Resources Appropriate For The Specified Culture Or The Neutral Culture

Sep 17, 2010

I am getting below error while running my application

Exception in MS Oracle DAAB Method - GetDataSet : Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "DABResource.resources" was correctly embedded or linked into assembly "DBServices" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Exception in MS Oracle DAAB Method - GetDataSet : Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "DABResource.resources" was correctly embedded or linked into assembly "DBServices" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Source Error: [Code]....

I am Having DBServices .dll which is registered in my assembley

Recently i installed VS 2008 in my system.this application is working fine in VS 2005 priviously.Now i am getting above error while running this application in VS2005

View 4 Replies

Localization :: Want To Change Culture Of The Specific Aspx Page Bases On The Main User's Culture

Nov 23, 2010

I need to change culture of the specific aspx page bases on the main user's culture.I am able to fetch the data that which culture main user have.But some how I am not able to set the same culture for that aspx page.I had written the below code for that.

[Code]....

But that is not working it sets the default culture of the browser.

View 1 Replies

AJAX :: Error / Could Not Find Any Resources Appropriate For The Specified Culture Or The Neutral Culture.

Jan 27, 2010

I followed the instructions to setup the Ajax Control Toolkit.

After that I just create a TabContainer and I'm getting this error when I try to run my website application :

Server Error in '/WebSite3' Application.

View 3 Replies

AJAX :: Get This Exception / Could Not Find Any Resources Appropriate For The Specified Culture Or The Neutral Culture

Feb 25, 2011

I want to add a calendar extender to my website so I downloaded the lastest Ajax Control Toolkit, added the calendar and when I start debugging I get this exception: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "AjaxControlToolkit.Properties.Resources.NET4.resources" was correctly embedded or linked into assembly "AjaxControlToolkit" at compile time, or that all the satellite assemblies required are loadable and fully signed. I have the dlls in the bin folder... I followed all the steps in the instruction guide for installing the ajax control toolkit.

View 1 Replies

AJAX :: Could Not Find Any Resources Appropriate For The Specified Culture Or The Neutral Culture

Jul 22, 2010

Server Error in '/' Application.

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure

"AjaxControlToolkit.Properties.Resources.resources" was correctly embedded or linked into assembly "AjaxControlToolkit" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "AjaxControlToolkit.Properties.Resources.resources" was correctly embedded or linked into assembly "AjaxControlToolkit" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Source Error:
[Code]....

Stack Trace:

[Code]....
Version Information: Microsoft .NET Framework Version:2.0.50727.3607; ASP.NET Version:2.0.50727.3614

View 1 Replies

AJAX :: How To Set Culture Just For CalendarExtender Irrespective Of Page Culture

Mar 1, 2010

I have a scenario where I am using CalendarExtender on a page with UICulture and Culture as "en-US".

But I want to show CalendarExtender in "de-DE" culture. I know that I can set up EnableScriptGlobalization="True" EnableScriptLocalization="true" for ScriptManager and CalendarExtender will show up as per culture defined for page. But this does not work for me because I can not change page level UICulture and Culture from "en-US" to "de-DE" ( If I do so, I face double value issue. e.g. double d = 12.34; is displayed as 12,34 on UI and then its unmanagable while editing values).

So coming back to my problem, Can I just change culture for CalendarExtender so that page culture is set to "en-US" and calender is shown in some different language? I know its not something straightforward, I might need to dig up source code.

View 7 Replies

Web Forms :: Convert Hijri Date To Gregorian?

Jun 27, 2010

i want to convert from Hijri date to Gregorian and vise verse i tried all method but all leds me to non correct hijri date

for example -->27-6-2010 corsepponding hijri date is 15 -7-1431

but all method say that its 16-7-1431

how can i slove this bug?? as windows dont see correct hijri date

i saw this hijri calender converstion is right how can i make one like this?

[URL]

View 4 Replies

Web Forms :: Convert Hijri Calendar Date To Gregorian?

May 3, 2010

i want to convert from Hijri date to Gregorian and vise verse i tried all method but all leds me to non correct hijri date

for example -->27-6-2010 corsepponding hijri date is 15 -7-1431

but all method say that its 16-7-1431

anyone can tell me how can i slove this bug?? as windows dont see correct hijri date

i saw this hijri calender converstion is right how can i make one like this?

[URL]

View 3 Replies

Localization :: Show Both Hijri And Gregorian Date In Tow Labels?

Dec 27, 2010

I want to show both Hijri and Gregorian date in tow labels when I select date from Calender control .

Is that possible in asp.net 3.5 c# ?

If this possible , How I can save booth formats in the table in sql server 2005 database (tow filds (hijridate <DateTime> -GregorianDate<datetime>))?

View 12 Replies

Localization :: Show Booth Hijri And Gregorian Date?

Feb 21, 2011

I want to show both Hijri and Gregorian date in tow labels when I select date from Calender control .

Is that possible in asp.net 3.5 c# ?

If this possible , How I can save booth formats in the table in sql server 2005 database (tow filds (hijridate <DateTime> -GregorianDate<datetime>))??

View 2 Replies

Web Forms :: UserControl With DateTime Property - Set Markup In Local Datetime Format

Jan 21, 2010

I created a UserControl and added a public DateTime property. I want to set this property in Markup (ie. <cc1:MyControl runat="server" id="MyControl1" DateTimeProp="1/1/2010" /> ) however I live in a place with a dd/mm/yyyy date format so it complains if I set something like "20/1/2010". Is there a way to set markup in my local datetime format or do I have to conform to "mm/dd/yyyy"?

View 2 Replies

Web Forms :: DateTime Parse String Was Not Recognized As Valid DateTime

Jun 1, 2012

obj.From = DateTime.Parse(txtFrom.Text, ci);

And it will give error String was not recognized as a valid DateTime. How it can be solved..

View 1 Replies

Forms Data Controls :: How Show Local Time In Datagridview Collumn DateTime From Database With Universal Datetime

Jun 2, 2010

How show local time in datagridview collumn DateTime from database with universal datetime

View 2 Replies

Web Forms :: Cookies Not Coming In Arabic?

Jun 10, 2010

I have a website which is in arabic. I am saving the username in cookies and displaying the username in label from cookies. But it is not coming in arabic. When i rum my website locally it works fine but on server it is not working.

My code is

[code]....

View 5 Replies

Web Forms :: Converting Website To Arabic

Dec 20, 2012

I need to convert my asp.net website to Arabic on a button click. My website renders data from database and also html tags. I am aware that i can achive this using google translator, But I am not looking for that. 

Below is my requirement.

My site will load in english as default languge and there will be an option(may be a button) to convert the site content to arabic. I need to achive this with minimum time.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved