.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Problem with changing language using culture info

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

I'm using the following msdn article to use different languages in my web application:


I'm following the instructions step by step in VS 2010, and it creates the resource files exactly how it's supposed to. 

However, when I run the program it just doesn't apply it. I don't see the different values from the resource file. 

If I leave my resource file name as sample.aspx.resx, it works. But when I change it to sample.aspx.en-us.resx, it doesn't work. I'm supplying culture from the aspx page's Culter and UICulture properties. I'm being very careful in choosing the correct file name, as that could be the issue,  but it just doesn't work. I also tried changing the culture in the backend code this way:

View Complete Post

More Related Resource Links

problem with culture info in Report.rdlc



          Me with C#.net and using report viewer control I am populating reports in my Report.rdlc I have a table in which two field are money values I want to format these fields so that if there is a value like 2300 it should show as 2,300.00 but when in format property I typed c then it shows as $2,300.00 How can I remove $ symobol from the field

I had changed the current culture info and tested  its working fine for a new new value but still in the report $ is showing

 private static void Pr_NewMethod()
            int[] ARR ={ 3, 2, 2 };
            System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo("en-US");
            System.Globalization.NumberFormatInfo NumberInfo = new System.Globalization.NumberFormatInfo();
            NumberInfo.CurrencySymbol = "";
            NumberInfo.CurrencyDecimalDigits = 3;

Merge Replication: Fails using Replication.SaveProperties when changing Subscription Info

I'm trying to use SQL Server/Compact Framework 3 Merge Replication functionality and am running into a problem when calling Replication.SaveProperties (using c#). I was hoping to get some clarification on whether its my interpretation on how things should work vs a coding problem. Basically, the Merge Replication seems to work as I can sync information between my handheld and server databases.  However, I've created a form on my handheld so that the user can change some synchronication settings (e.g. Publication or Publisher Name) and then save it.  What I've noticed is : 1) You can NOT call Replication.SaveProperties until after a synchronization is performed (otherwise you get an error message).  Assuming this is so that it can create the "__sysMergeSubscriptions" table. Does this sound right? 2) If I then try to change the saved Subscriber information via another call to Replication.SaveProperties (e.g. change the Publication info), I then get an error message that says: The subscription was not found. Publisher, PublisherDatabase, or Publication  could be incorrect. Is this normal behavior?  Does this mean that you can you NOT change subscriber information; only add or drop it? Thanks,  Ed

Problem changing/upgrading properties on WebParts that have already been deployed and added to Share

I have created two custom webparts which I deploy as a Feature within a Solution.  These webparts have been added to various pages on my site.  Due to design changes, I upgraded the webparts with some new functionality and some other changes to the webpart properties, such as the WebPart title, title icon and catalog icon.  After I have retracted/deleted the old solution and re-deployed the new solution (and activated the feature) the webparts have been upgraded fine, however, the webpart properties were not changed for any webparts that were already added to pages.  I can add new instances of the webparts and they have the updated properties (and also show correctly in the wp gallery and catalog). Is there a step I am missing in order to upgrade any webparts (namely the properties) that have already been added to pages?  Or is this something I have to take care of programmatically somehow to workaround the upgrade problem?

Language problem cookies in the Arab language

Language problem cookies in the Arab language upload my project to server , I discovered that when you save data[Values] in cookies, we find  (  Request.Cookies["test"].Values["val"] -----> ?????)  in that the symbols =????? 

System.Net.Mail e-mail header info problem

I'm new to using the system.net.mail class and I'm having trouble with a small program I'm writing.  I use my SendMessage() to send an email public static void SendMessage(string msg)         {             System.IO.File.Copy(mySource + msg, destSource + msg);             MailMessage mail = new MailMessage("from@me.com", "to@you.com, msg, "");                        Attachment attch = new Attachment(destSource + msg, "text/plain; format=flowed;reply-type=original"); //content-type text/plain                                   mail.Attachments.Add(attch);                                  MessagingCenter.client.Send(mail);             mail.Dispose();         } However, the email sent

DetailsView edit problem after changing database

Hello!I had a DetailsView control for editing records in a Access 2003 database. I transfered the database to MS SQL 2008 and using the same code does not work - after clicking edit nothing happens (no error) and the record is not updated.ASP code:<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <h2> Urejanje kontaktnih podatkov </h2> <p> <asp:TextBox ID="txtKontaktID" Visible="false" runat="server"></asp:TextBox> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:conKrik %>" ProviderName="<%$ ConnectionStrings:conKrik.ProviderName %>"  SelectCommand="SELECT tblKontakt.*, tblStranka.strSkrajsanNaziv FROM krik.tblKontakt INNER JOIN krik.tblStranka ON tblKontakt.StrankaID = tblStranka.StrankaID WHERE ([KontaktId] = @id)" UpdateCommand="UPDATE tblKontakt SET strIme = @strIme, strPriimek = @strPriimek, strPoslovnaEnota = @strPoslovnaEnota, strTelefon = @strTelefon, strFaks = @strFaks, strMobitel = @strMobitel, strEmail = @strEmail, rmkOpomba = @rmkO

problem with changing cssclass name using javascript

function DoFocus(fld) { fld.className = 'textboxFocus'; } function ChangeToFocus() { document.getElementById('<%=tbComment.ClientID%>').className="textboxFocus"; } button1.Attributes.Add("OnClick", "ChangeToFocus();")//Not working tbComment.Attributes.Add("OnFocus", "DoFocus(this);")//Working I have two methods to change a control's css class (etc. textbox), however, javascript method 'ChangeToFocus' is not working but I do need that function or something could do the samething (I can't use DoFocus(fld) function as it need to pass that control's reference)     Many thanks for your help! Ray

SQL Server 2008 R2 Installation Problem - The language ENU is not supported by this setup package.


I am trying to install SQL Server 2008 Standard R2 on a Windows Server 2008 R2 64bits machine (all updates applied)... 

I run the setup.exe on the command line and I get the following error :

The language ENU is not supported by this setup package.
An error occurred during the SQL Server 2008 R2 Setup operation.

Error result: -2067529698
Result facility code: 1220
Result error code: 30

For more information, review SQL Server 2008 R2 Setup logs in your temp folder.

There is no log generated.

My regional settings + locale are all English-US

Any ideas?



How to set the default culture Info for all thread of an application independant from the Windows UI


A classic 'european' topic?

I am working with Windows7Pro in German, and VS2010 in English. I whish I had all exception handling in english.
Thus, I set the explicly the current culture to english:
 var culture = new CultureInfo("en-us");
 Application.CurrentCulture = culture;
        Thread.CurrentThread.CurrentUICulture = culture;
        Thread.CurrentThread.CurrentCulture = culture;

But I do still have some exception in German, because 'by design', .NET Framework considers the Windows UI language as default culture when a new thread in created (e.g. by GUI controls), as I read here http://www.dotnetmonster.com/Uwe/Forum.aspx/winform/14177/setting-culture-of-threads

What is the motivation for such a design? It has always been a problem for us in Europe working with multi languages: it is quite difficult to ensure the software is working properly whereever it is rolled out.
Is there a way to define the default culture of all children threads?

Problem with language pack and navigation to pages



We have installed the Norwegian language pack for Sharepoint 2010 RTM, as explained in this technet article: http://technet.microsoft.com/en-us/library/cc262108.aspx

Everything seemed to be working as excepted, except for some page navigation which is not using the correct language files. We are registerring some web parts in the onet.xml, and the code below are causing some problems.  

 <Module Name="MyWebpart" Url="$Resources:osrvcore,List_Pages_UrlName;" Path="">

 The "$Resources:osrvcore, List_Pages_UrlName" retrieves 'Pages' from cmscore.resx. The problem is that the Norwegian translation for the List_Pages_UrlName is located in the cmscore.nb-NO.resx. Do I have to replace the original cmscore.resx with the language specific version? I thought Sharepoint would handle this for me. Or is there some step I have missed?


insert date problem when culture is arabic



I want to insert date value in database

when my page loads i am setting the culture into ar-sa

and when insert date i am getting the problem

SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

Public Sub Add_Date(ByVal title As String, ByVal Schedule_date As Date)
            command.CommandText = "sp_Schedule_DML"
            command.CommandType = CommandType.StoredProcedure
            If Schedule_date = Nothing Then
                command.Parameters.AddWithValue("@optSelect", 0)
                command.Parameters.AddWithValue("@title", title)
                command.Parameters.AddWithValue("@sdate", System.DBNull.Value)
                command.Parameters.AddWithValue("@optSelect", 0)
                command.Parameters.AddWithValue("@title", title)
                command.Parameters.AddWithValue("@sdate", Schedule_date)
            End If
            If connection.State = Data.ConnectionState.Closed Then
            End If
            If connection.State = Data.ConnectionState.Open Then
            End If
        Catch ex As Exception
            Throw New Exce

Info Path Form Problem; the form is closed


Hi All

I am facing an error in info path form web enabled.


When i open a new form, it opens and saved. Even the sendingemail is also working.

But when i try to open the already saved form. The form is not opening it is displaying the error that the form has been closed. Or it is not getting the form from the location..

Changing Default Language for British Date Format




After reading several topics about Datetime formats from US-English to British, I got more confused.  I have successfully changed Default Language on my local machine's SQL Server Express using this:

EXEC sp_configure 'default language', '23' 

But I can't change it on a Server side.  It prompts me to run 'RECONFIGURE' again and when I do I am getting this error:

"Address Windowing Extensions (AWE) is not supported in this edition of SQL Server."


Problem with JavaScript which is used when changing the value in textboxes.



This is Naveen, i am trying to upgrade a internal website from .Net 1.1 to .Net 2.0 in VB.

but the code is giving an exception in explorer the same code doesn't give exception in explorer,in the same time it doesnot work roperly..

when i try change the values in text boxes an exception is occured as

"Microsoft JScript runtime error: 'document.Form1.txtRentalCost' is null or not an object" with break continue and ignore options.

here is my JavaScript:

<script language="javascript" type="text/javascript">
    function Recalculate()
        document.Form1.txtRentalCost.value = parseFloat(document.Form1.txtRentalPerDay.value) * parseInt(document.Form1.txtNumOfDays.value) * parseInt(document.Form1.txtRate.value) / 100;




<input id="txtRentalCost" style="z-index: 114; left: 344px; width: 139px; position: absolute;
            top: 208px; height: 22px" type="text" size="17" name="txtRentalCost" runat="server" />


<input language="javascript" id="txtR

Problem of access when changing Roles


Hello friends,

well i have a simple application using an authentication (user and password) before accessing and there are several roles bound to each user.

in my web.config i have configured the acces for each page according to each role, this is an example below:

<location path="Home.aspx">
       <allow roles="administrator,role1"/>
       <deny users="*"/>
<!-- -->
<location path="admin.aspx">
       <allow roles="administrator"/>
       <deny users="*"/>

and i have 2 users:

1: admin (default role: administrator)

2: guest (default role: role1)

my problem is as follows:

if i give acces to the user "guest" to open the "admin.aspx" page with changin him his role from "role1" to "administrator", this one do not function except if i r

info path problem on another web front end




I have a info path form which is working fine in environment (1 Web Front End and 1 Application Server). But now i have added a new web front end. Now the same form is if open through new Web Front End, it is not opening. I change the dll file but still it is giving the same error.


Can any body tell me what configuration is needed for this about info path form?

SQL install language support problem

I don;t know where there is the problem?
I install sharepoint 3.0 64 bit english with sql 2008 trial version + english windows 2008 standard server...
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend