Click here to Skip to main content
15,896,557 members
Home / Discussions / C#
   

C#

 
AnswerRe: How do I take the content from a javascript variable, and paste it into a c# variable? Pin
Eddy Vluggen30-Apr-11 22:13
professionalEddy Vluggen30-Apr-11 22:13 
GeneralRe: How do I take the content from a javascript variable, and paste it into a c# variable? Pin
_Q12_5-May-11 8:26
_Q12_5-May-11 8:26 
GeneralRe: How do I take the content from a javascript variable, and paste it into a c# variable? Pin
Eddy Vluggen5-May-11 9:21
professionalEddy Vluggen5-May-11 9:21 
QuestionUsings for "ManagementClass" in Visual C# 2010 Pin
rms12330-Apr-11 2:28
professionalrms12330-Apr-11 2:28 
AnswerRe: Usings for "ManagementClass" in Visual C# 2010 Pin
Philippe Mori30-Apr-11 2:39
Philippe Mori30-Apr-11 2:39 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
rms12330-Apr-11 2:45
professionalrms12330-Apr-11 2:45 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
Philippe Mori30-Apr-11 2:56
Philippe Mori30-Apr-11 2:56 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
Philippe Mori30-Apr-11 3:02
Philippe Mori30-Apr-11 3:02 
AnswerRe: Usings for "ManagementClass" in Visual C# 2010 [modified some more] Pin
Luc Pattyn30-Apr-11 2:46
sitebuilderLuc Pattyn30-Apr-11 2:46 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
rms12330-Apr-11 2:54
professionalrms12330-Apr-11 2:54 
AnswerRe: Usings for "ManagementClass" in Visual C# 2010 Pin
Luc Pattyn30-Apr-11 2:59
sitebuilderLuc Pattyn30-Apr-11 2:59 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
rms12330-Apr-11 3:20
professionalrms12330-Apr-11 3:20 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
PIEBALDconsult30-Apr-11 3:37
mvePIEBALDconsult30-Apr-11 3:37 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
Luc Pattyn30-Apr-11 4:08
sitebuilderLuc Pattyn30-Apr-11 4:08 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
PIEBALDconsult30-Apr-11 4:59
mvePIEBALDconsult30-Apr-11 4:59 
AnswerRe: Usings for "ManagementClass" in Visual C# 2010 Pin
Luc Pattyn30-Apr-11 5:09
sitebuilderLuc Pattyn30-Apr-11 5:09 
QuestionProgram With Multi language support Pin
Arunkumar.Koloth29-Apr-11 17:32
Arunkumar.Koloth29-Apr-11 17:32 
AnswerRe: Program With Multi language support Pin
OriginalGriff29-Apr-11 20:54
mveOriginalGriff29-Apr-11 20:54 
If you look here: http://stackoverflow.com/questions/119568/best-practice-to-make-a-multi-language-application-in-c-winforms[^] there is a discussion of the various ways to achieve this. The way you have selected is not necessarily the best: it requires a version of SQLServer to be available to each PC on which your app will run, which may not be possible or desirable.

However:
public void changelanguage(object code) {
    con.Open();
    SqlCommand com = new SqlCommand();
    SqlDataReader dr;
    com.Parameters.AddWithValue("language", code);
    com.CommandText = "SELECT translated FROM translation WHERE languagecode=@language";
    dr=com.ExecuteReader();
    while (dr.Read()) {
        if ((string) dr["textinenglish"] == theWordIWantToTranslate) {
            ...
            }
        }
    }


BTW: Please remember that you are responsible for Close-ing and Dispose-ing all of the SQLCommand and SQLConnection objects you create!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

Manfred R. Bihy: "Looks as if OP is learning resistant."

AnswerRe: Program With Multi language support Pin
PIEBALDconsult1-May-11 3:13
mvePIEBALDconsult1-May-11 3:13 
GeneralRe: Program With Multi language support Pin
Arunkumar.Koloth1-May-11 6:31
Arunkumar.Koloth1-May-11 6:31 
GeneralRe: Program With Multi language support Pin
PIEBALDconsult1-May-11 17:28
mvePIEBALDconsult1-May-11 17:28 
Questionc# Pin
mansingh3529-Apr-11 6:25
mansingh3529-Apr-11 6:25 
AnswerRe: c# Pin
Keith Barrow29-Apr-11 6:44
professionalKeith Barrow29-Apr-11 6:44 
GeneralRe: c# Pin
OriginalGriff29-Apr-11 8:25
mveOriginalGriff29-Apr-11 8:25 
GeneralRe: c# Pin
Keith Barrow29-Apr-11 8:34
professionalKeith Barrow29-Apr-11 8:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.