Click here to Skip to main content
15,917,645 members
Home / Discussions / C#
   

C#

 
GeneralRe: Messageboxes as MDI children Pin
Bekjong20-Mar-08 5:05
Bekjong20-Mar-08 5:05 
QuestionWeb server and User Machine Pin
drbrucce20-Mar-08 3:03
drbrucce20-Mar-08 3:03 
GeneralRe: Web server and User Machine Pin
N a v a n e e t h20-Mar-08 3:09
N a v a n e e t h20-Mar-08 3:09 
GeneralSecurity exception Pin
DaveyM6920-Mar-08 2:59
professionalDaveyM6920-Mar-08 2:59 
GeneralRe: Security exception Pin
Bashir Magomedov20-Mar-08 4:21
Bashir Magomedov20-Mar-08 4:21 
Questionproblem with a function Pin
pyde20-Mar-08 2:44
pyde20-Mar-08 2:44 
GeneralRe: problem with a function Pin
Paul Conrad21-Mar-08 10:05
professionalPaul Conrad21-Mar-08 10:05 
GeneralRe: problem with a function Pin
pyde22-Mar-08 0:57
pyde22-Mar-08 0:57 
no, the problem is that like i said i want to get the description language from the unique product (db.productID)for each product to be displayed in an textbox which I'h placed in a listview. So the productId is primarykey and then I,h five different collumns [productDescriptionFIN],[productDescriptionENG],[productDescriptionSWE],[productDescriptionRUS],[productDescriptionGER] from where I want to fetch the info about each product...
I,h done the if statement but I,h the problem to solv hove to get the information to be displayd right...



//the function for the fetching unique info....
protected string GetDescription(object productId)

{

string strDescription = "ProductDescription";



if (Thread.CurrentThread.CurrentCulture.Name.ToLower() == "fi-fi")
{
strDescription = "productDescriptionFIN";
}


else if (Thread.CurrentThread.CurrentCulture.Name.ToLower() == "en-us")
{
strDescription = "productDescriptionENG";

}
else if (Thread.CurrentThread.CurrentCulture.Name.ToLower() == "sv-se")
{
strDescription = "productDescriptionSWE";
}

else if (Thread.CurrentThread.CurrentCulture.Name.ToLower() == "de-de")
{
strDescription = "productDescriptionGER";
}
else if (Thread.CurrentThread.CurrentCulture.Name.ToLower() == "ru-ru")
{
strDescription = "productDescriptionRUS";

}


//If I choose this the site is function but it just trigger e.g "productDescriptionRUS" in the textbox if I'h choosed the language russian
//return strDescription.ToString();

//But this i,m unsore, is this right way to go
//TextBox desc = new TextBox(productId[strDescription](), productId["productId"]());
//return desc;

//This is same is this the right way to go
//ListView desc = new ListView(productId[strDescription].(), productId[strDescription].ToString());
//return desc;
}

//or should I palce the code in the page Load event?????????

protected void Page_Load(object sender, EventArgs e)
{
lblNameProductInfo.Text = Resources.Resource.lblNameProductInfo;


if (!Page.IsPostBack)
{
//the right code here?????

}
}

Confused | :confused: max
write to me please if you need some more info or the site adress so you can see the problem live
GeneralRe: problem with a function Pin
pyde26-Mar-08 8:26
pyde26-Mar-08 8:26 
GeneralPrinting borderless with PrintDocument class (on a printer that supports it) Pin
AntoonHzn20-Mar-08 2:42
AntoonHzn20-Mar-08 2:42 
GeneralSpeed MyDriver Day !!! Pin
morisson_c20-Mar-08 2:36
morisson_c20-Mar-08 2:36 
GeneralRe: Speed MyDriver Day !!! Pin
Rob Philpott20-Mar-08 2:46
Rob Philpott20-Mar-08 2:46 
GeneralRe: Speed MyDriver Day !!! Pin
morisson_c20-Mar-08 2:48
morisson_c20-Mar-08 2:48 
GeneralRe: Speed MyDriver Day !!! Pin
Bekjong20-Mar-08 3:53
Bekjong20-Mar-08 3:53 
GeneralRe: Speed MyDriver Day !!! Pin
morisson_c20-Mar-08 4:03
morisson_c20-Mar-08 4:03 
GeneralCached Values Pin
Chrispie12320-Mar-08 2:30
Chrispie12320-Mar-08 2:30 
QuestionAssign drive letter Pin
boschler20-Mar-08 1:22
boschler20-Mar-08 1:22 
GeneralRe: Assign drive letter Pin
Vasudevan Deepak Kumar20-Mar-08 5:44
Vasudevan Deepak Kumar20-Mar-08 5:44 
GeneralRe: Assign drive letter Pin
boschler26-Mar-08 2:54
boschler26-Mar-08 2:54 
Generalconverting string with multiple values to string array Pin
gottimukkala20-Mar-08 1:18
gottimukkala20-Mar-08 1:18 
GeneralRe: converting string with multiple values to string array Pin
Not Active20-Mar-08 1:23
mentorNot Active20-Mar-08 1:23 
GeneralRe: converting string with multiple values to string array Pin
Farhan Ali20-Mar-08 1:24
Farhan Ali20-Mar-08 1:24 
GeneralFileUpload1.Postedfile.FileName not working in firefox Pin
Farhan Ali20-Mar-08 1:10
Farhan Ali20-Mar-08 1:10 
GeneralNeed Information Pin
Krazy Programmer20-Mar-08 0:45
Krazy Programmer20-Mar-08 0:45 
AnswerRe: Need Information Pin
Abhijit Jana20-Mar-08 1:04
professionalAbhijit Jana20-Mar-08 1:04 

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.