|
Thank you very
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Glad to help you
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
hi all,
i'm trying to get information from my database. When the product is shown on the web page it should have the right language in the product description...if user have choosen finnish language I want the product description be in finnish..
now it's build and it's shows just the e.g("productDescriptionFin") if the FIN language is choosed...in the textbox...
in the db [product] i'h primary key for productId and then columns like productDescriptionENG, productDescriptionFIN, productDescriptionGER, productDescriptionRUS and productDescriptionSWE.
here is the codebehind productInfo_1.aspx.cs
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";
}
return strDescription.ToString();
//TextBox desc = new TextBox(productId[strDescription](), productId["productId"]());
//return desc;
//ListView desc = new ListView(productId[strDescription].(), productId[strDescription].ToString());
//return desc;
}
I display the product info on a ListView with a textbox inside...
<asp:Textbox Style="position: static"
ID="tbDescrProductInfo"
runat="server" Width="245px"
TextMode="MultiLine"
Text='<%# GetDescription(Eval("productId")) %>' ReadOnly="True"></asp:Textbox>
so i wonder if any one can give me some tips or correct me if i'm going far to wrong in the code....or should I do something in the page_Load event??
plz max in sverige
|
|
|
|
|
|
okay so I am writing a c# program that will verify a user exists in our edirectory and then launch an application. basiaclly I am trying to avoid locking out the user from novell and not let the user use the application during their grace login period (when they need to chagne their password). Authenticating the user is no problem but i haven't been able to figure out how to read specifically "loginIntruderAttempts" and "loginGraceRemaining" attributes. Another words I would like to end up with something to the effect if user has x # of "loginIntruderAttempts" throw error. if "loginGraceLimit" != "loginGraceRemaining" for user throw error. Any help or guidance with this would be highly appreciated.
c# noobie
|
|
|
|
|
if (tn.Tag is DataNodePrimitive<string> )<br />
{<br />
DataNodePrimitive<string> dnp = (DataNodePrimitive<string> ) tn.Tag;<br />
<br />
dataEditorControl1.SetData<string>(tn.Text, dnp.Data);<br />
}
replace all occurances string with any type.
I've spent a good hour trying to work out how instead of testing if an object is DataNodePrimitive<string> , or DataNodePrimitive<int> , how it could be generalised to DataNodePrimitive<T>
Say I have an array of supported Types (Type[]), and i want to test if the tag is of DataNodePrimitive<Type[i]>, how on earth could I write code to do that?
I want my code to be as extendable as possible without having to write more.
Thanks,
Ben
|
|
|
|
|
You cannot make code in a class generic due to the fact that generics are resolved at compile time.
If the code is part of an object then it can be.
public class DataNodePrimitive<t>
{
...
public void SomeProcesss
{
DataNodePrimitive<t> dnp = (DataNodePrimitive<t>) tn.Tag;
...
}
}
MyProgram
/....
DataNodePrimitive<string> mynode = new DataNodePrimitive<string>();
</string></string></t></t></t>
However if the code is just in your program and you expect to have a runtime evaluation, that will not work. You need to create a method of the different types that T can be and overload the method call.
|
|
|
|
|
Well, in the end, I made a Class called DataNodePrimitive that DataNodePrimitive<t> extends. DataNodePrimitive is now just a class that has Data being an object. DataNodePrimitive<t> just ensures that it is type safe - but now I don't use it anywhere in the program for the fact I need full runtime support.
|
|
|
|
|
Is there a class or method in BCL which lets me view the logical ports opened and currently listening to??
Som
|
|
|
|
|
|
Hello,
I have read many forums and some posts on CodeProject but still have nto figured this out. I want ym application to send keystrokes to an application. At the moment it can be the currently focusses application. Any code samples will be helpful, if you do post code please insert the headers i need... i think that's way my current code is not working.
Thank you
- Droz -
___ ___
/\/\ /\ | |
|
|
|
|
|
What have you tried so far? Also, are you sure you are posting to the right forum? I mean, you're talking about headers and stuff?
|
|
|
|
|
If you want to achieve this in C then it is wrong forum. If you want it in C# then use SendKeys class
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Okay, I was cornered by deprecation. I must handle large images in my application, and System.Drawing is just not fast enough. Graphics.DrawImage() with source and destination rectangles seemed to be the best way, but even that slows down terribly when much zooming is involved.
I remembered that DirecrDraw would solve this problem, but that's deprecated, and the docs told me I should do it in 3D instead. Not that it matters, since my Managed DirectX is deprecated in favor of XNA anyway. Now, XNA doesn't work together with Visual Studio as I understand it, and the user would need to download extra framweorks anyway.
So, is there a way to use up to date hardware acceleration technologies in Visual Studio under .net? What is supported and what is not? I'll need this software running for years to come, and I might even want to modify it in the future. It would be very unpleasant if the technology it's built on would turn obsolete anytime soon.
|
|
|
|
|
Well on the form you can set DoubleBuffered to true. I've noticed that in one of my games it decreased drawing by quite a bit.
|
|
|
|
|
Hi every body,
I am having a problem in using IN operator to filter data in crystal report.
I have tried with selection formula as
<br />
recordSelectionformula1 = "{viewCrystRepSalesOfProductbyCustomer.CustomerID} IN ("+1+","+2+")";<br />
The following error has occured.
The ) is missing.
Any body who have idea about this thing.Then please reply me as soon as possible.
with regards
sureshthedude
Hello man Check it Out
|
|
|
|
|
Hi I need some help for ploting some signal processing data in a 3d graph for my student project. I am working with C#. I have searched in the net but it's not possible for me to buy some tools for serving my purpose. Please help me in this regard with some links. As I am a beginer in C#, plz also tell me how to use those class library.
Faysal
|
|
|
|
|
There are several powerful 3D charting controls available on codeproject.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Plz give me some links..I am really strugling with this. I have tried some from code project but could not work out my problem.
Faysal
|
|
|
|
|
Search the articles for "3d graph" and you'll come up with some.
|
|
|
|
|
I have a ListView set to details mode, which contains file paths. Is it possible to truncate the cells from the left hand side instead of the right?
For example:
If a cell contains a string (C:\Windows\Some directory\file.txt), then if the column is too small, the cell just reads C:\Windows\So...
I need it to truncate from the other side, so it reads ...ctory\file.txt. Is this possible?
|
|
|
|
|
It's not supported natively. You'd have to come up with your own implmentation of the ListView control and replace the drawing code to support this.
|
|
|
|
|
|
What is the use of MVC architecture
|
|
|
|
|
Clean separation of model,view and controller. Easy to maintain and many more.
|
|
|
|