|
hy everyone!
is it possible to easyly convert date formats into different formats.
what i want to do is to convert a date format from english format to german format or vice versa.
i do have a function which looks like
public static string ConverFormat (string input, string format, string Cultureinfo)
so when entering this function input contains the date, format contains the formatstring, in which format to display (e.g. {"mm/dd/yyyy"}) and cultureinfo contains the cultureinfo (e.g. en-US) to which the input has to be converted to (english or german format).
so let's say input = 01.05.2008, format = {mm/dd/yyyy} and cultureinfo = en-US then the output should be 05/01/2008.
in here how to convert datetime.now into desired format???[^] i found how to format the type of how to display the date. but i want to switch it from dd.mm.yyyy to e.g. mm/dd/yyyy or mm.dd.yyyy (following the the format declared in parameter format).
do i have to do this by hand, meaning parsing the string and change it to the desired format or is there a chance to do this using default functions?
thanks!
Stephan.
modified on Thursday, May 1, 2008 6:25 AM
|
|
|
|
|
|
Please only use ISO 8601 formats -- yyyy-MM-dd
|
|
|
|
|
hi,
I have an application with a few custom controls in it.
My problem is, after loading, if I resize my application it takes a long time for all the controls to rearrange them selvs.
any idea how to make things faster?
tnx
leeoz
|
|
|
|
|
Add to the form constructor after the InitializeComponent() the following:
<br />
this.SetStyle(<br />
ControlStyles.AllPaintingInWmPaint |<br />
ControlStyles.UserPaint |<br />
ControlStyles.DoubleBuffer,true);<br />
|
|
|
|
|
Hi
Im trying to retrieve user properties from active directory.
It successfully gets the first required property, but after that all i get is
'NullReferenceException - Object reference not set to an instance of an object'
Why is this? Here is the code:
DirectoryEntry standardUser = new DirectoryEntry("LDAP://CN=" + txtUser.Text.ToString() + ",OU=Users - Standard Users,DC=mydomain,DC=com,DC=uk", "username", "password");<br />
string sUSN = standardUser.Properties["userPrincipalName"].Value.ToString();<br />
string nastsprofile = (standardUser.Properties["TerminalServicesProfilePath"].Value.ToString());
The bit which gets the userPrincipalName works fine. After that it all goes wrong.
|
|
|
|
|
Well, tha fact that you can get the userPrincipalName means that standardUser is fine, so the problem must be that
standardUser.Properties["TerminalServicesProfilePath"].Value is null. I think you might need a lower case 'T' or something.
I found this similar problem on t'internet HERE[^], where the apparent solution was to use lower case.
My current favourite word is: Bacon!
-SK Genius
|
|
|
|
|
Ive followed the link.
And changed it to all lowercase.
And replaced .value with .invokeget.
Still no avail
|
|
|
|
|
OK, i think i have it. I'm quite sure you do need to use InvokeGet. InvokeGet will return an object, so you'll need to cast it as a string.
string nastsprofile = standardUser.InvokeGet("TerminalServicesProfileName") as string;
or
string nastsprofile = standardUser.InvokeGet("terminalServicesProfileName") as string;
or
string nastsprofile = standardUser.InvokeGet("terminalservicesprofilename") as string;
I'm pretty sure one of those should work.
My current favourite word is: Bacon!
-SK Genius
|
|
|
|
|
hello
wich function I can add to this function for having a conference (in voice not msg) between 3 personne at minimum
private void checkConf_CheckedChanged(object sender, EventArgs e)
{
int nBusyCount = 0;
for (int nLineCount = 0; nLineCount < 2; nLineCount++)
{
if (iaxc.OnLineState(nLineCount))
nBusyCount++;
}
if (nBusyCount < 2 && CheckStartConf.Checked)
{
CheckStartConf.Checked = false;
MessageBox.Show("Dial/receive more than one calls and then click start conference check box.");
}
}
|
|
|
|
|
Wow - what a question. How is your computer actually in control of your phone lines ? Looks like you have some sort of API, have you read it's docs ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i'm develloping a softphone with the API AsteriskIaxClient (vb.net).
And i want to implemant a function Conference.
But sorry i don't understand you.
Please help me.
if someone have any idea about this probleme can we help me and thank you 
|
|
|
|
|
OK, lets revisit this. You are using a third party API that most people here will not have heard of, in VB.NET. So, you're asking about it in our C# forum, and at first, not even telling us what you're using.
I suggest you read the article I link to in my sig, you obviously have trouble working out how to find the best resources for your problems. Your starting point is the docs for the library you're using, any support forums they may have, etc.
I have to admit that googling the API name gets me four pages, in French. I hope you have the resources to do better, because if the whole web has not heard of this library, odds are low that we will have.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
I'm working with this library AsteriskIaxClient and i wan't to develop a function of conference.
Please if you have an idea about this API help me to implemant this function on my project.
And thank you for your help.
|
|
|
|
|
I create a list view and add icons to all the listviewItems , i can see icon when they are list, and small but when i enable large icon there is only text shown not icon. How can i see icon plz help me out.
|
|
|
|
|
Are you providing large icons for the items ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I dont know how to create a trigger inside a stored procedure
|
|
|
|
|
What does this have to do with C# ?
A trigger and a stored proc are two different things, do you mean you want a stored proc to fire a trigger ? A trigger is fired on a specific action, such a deleting or adding a row. You can't make a trigger just fire from one proc, instead write a function or proc that your first proc calls.
Try asking in the SQL forum in future, when your question is about SQL, please. It really does help you get better answers.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I've been constructing an ASP.Net application using the 2.0framework,
I wanted to see if I can set up my pages for access directly via localhost
. My login page loads, and any validation controls on the page
work fine, so I know it's recognizing the ASP.Net code there, however,
when I try to log on, the page just refresh not go to next means
response.redirect can not work properly how can i solve this problem
,
|
|
|
|
|
Didnt quite get you, the header ssays you want to run ASP.NET on IIS and you are asking about running it locally..
As for running it on IIS, please specify the OS you are running..
is it a WIN XP or WIN Server 2003?
|
|
|
|
|
Member 4432086 wrote: I've been constructing an ASP.Net application using the 2.0framework,
WE have an ASP.NET forum.
Member 4432086 wrote: means
response.redirect can not work
no WAY does it mean that.
Member 4432086 wrote: how can i solve this problem
1 - ask in the right forum
2 - debug your application to see what's really going on
3 - post code if you want help, your code is obviously broken. Perhaps you changed the server and you used absolute URLs in code that are now invalid ? No WAY ASP.NET works but response.redirect is broken. Your code is broken.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I added some files in my projects resources and made them as a embedded resources. I want to get all the file names.
Plz help...
thanx in advance...
|
|
|
|
|
Hi Guru,
Here is the code snipet:
System.Reflection.Assembly ass = System.Reflection.Assembly.GetExecutingAssembly();
string[] files = ass.GetManifestResourceNames();
for(int i=0;i<files.Length;i++)
MessageBox.Show(files[i]);
Thanks,
Gopal.S
|
|
|
|
|
Hi,
I'm sure most of us have seen movies where there is a computer wizz hacking away at a computer, as he does, there is a window on the screen that seems to be showing all of the compiling code.
I know this is for dramatic effect, but is there a way (using C#) to reflect the compiled code (or better, the non-compiled code) as it is run onto a label or something?
Cheers,
Mark.
|
|
|
|