Update Resource(.resx) file
-
Hi all, I have one resource file and i want to update and delete the content from the resource file programetically, but when i update the resource file thru one form then it will insert the new record rather than update. Below is my code.
ResXResourceWriter w = new ResXResourceWriter("ResXForm.resx"); w.AddResource("test", "test123"); w.Generate(); w.Close();
And when i insert the record programetically, at that time it will insert the record, but it will overright the previous record. how it is possible ?:confused:Rana Krishnraj
-
Hi all, I have one resource file and i want to update and delete the content from the resource file programetically, but when i update the resource file thru one form then it will insert the new record rather than update. Below is my code.
ResXResourceWriter w = new ResXResourceWriter("ResXForm.resx"); w.AddResource("test", "test123"); w.Generate(); w.Close();
And when i insert the record programetically, at that time it will insert the record, but it will overright the previous record. how it is possible ?:confused:Rana Krishnraj
So let's see here ... you execute an AddResource and yet you cannot figure out why it is ADDING the record instead of updating???? I suggest you find another career or go back to school. But if you insist on remaining a programmer, then I just gave you the clue to your answer.
-
So let's see here ... you execute an AddResource and yet you cannot figure out why it is ADDING the record instead of updating???? I suggest you find another career or go back to school. But if you insist on remaining a programmer, then I just gave you the clue to your answer.
Hey, i know i use addsource but u know what happen is ?? suppose i have 4 records in my resource file and when i add new record programetically at that time it will erase previous 4 records and add new i records so right now i have only one records in my resource file. so understand it will not append the records. i know its my mistake in asking question but from now do not use this kind of words ok..:mad: and if u don't know then do not reply with this kind of words understand.
Rana Krishnraj
-
Hey, i know i use addsource but u know what happen is ?? suppose i have 4 records in my resource file and when i add new record programetically at that time it will erase previous 4 records and add new i records so right now i have only one records in my resource file. so understand it will not append the records. i know its my mistake in asking question but from now do not use this kind of words ok..:mad: and if u don't know then do not reply with this kind of words understand.
Rana Krishnraj
The very, very basic process of changing an element in an array: resource["text"] = "test 123";
-
Hey, i know i use addsource but u know what happen is ?? suppose i have 4 records in my resource file and when i add new record programetically at that time it will erase previous 4 records and add new i records so right now i have only one records in my resource file. so understand it will not append the records. i know its my mistake in asking question but from now do not use this kind of words ok..:mad: and if u don't know then do not reply with this kind of words understand.
Rana Krishnraj
Doing a little googling I find that you have done two things wrong. First you defined your FileStream wrong. You have it set of Create or Open and do not have it set for ReadWrite Next you are only using AddResource for everything. Look at AddResourceData. If none of those help then you are SOL. And while you may not like what I say, I do not like jobs stolen by cheap Indian labor and then having the same job theives coming here begging us to write their code for them or help them become programmers.
-
Doing a little googling I find that you have done two things wrong. First you defined your FileStream wrong. You have it set of Create or Open and do not have it set for ReadWrite Next you are only using AddResource for everything. Look at AddResourceData. If none of those help then you are SOL. And while you may not like what I say, I do not like jobs stolen by cheap Indian labor and then having the same job theives coming here begging us to write their code for them or help them become programmers.
OK Now don't explain me in air ok. Doing a little googling is not enough ok and one more thing when u make an object of ResXResourceWriter and after that try yo find object's associated methode. there is no any kind of methode that u specufy - AddResourceData() understand u SOL. any way i already implement it. From now don't reply to any body with this kind of words understand u Bhenchode..
Rana Krishnraj
-
Hi all, I have one resource file and i want to update and delete the content from the resource file programetically, but when i update the resource file thru one form then it will insert the new record rather than update. Below is my code.
ResXResourceWriter w = new ResXResourceWriter("ResXForm.resx"); w.AddResource("test", "test123"); w.Generate(); w.Close();
And when i insert the record programetically, at that time it will insert the record, but it will overright the previous record. how it is possible ?:confused:Rana Krishnraj
Hi Rana, see this Link,I hope it help you http://sandblogaspnet.blogspot.com/2009/11/updating-resource-file.html[^]
mahmoud kohansal