I used to use the mod function in asp to figure out the following while looping through rows in a dataset to display a matrix style grid of products:
if n mod 3 = 0 then
//start a new...
i need to click on a button in another application from my C# application, i have API calls working to activate or close the window etc and they work fine so i know i am sending messages, and ...
I've been using the following C# code. Now I need to have a seperate date and time instead of both in the same string:
DateTime dateTime = DateTime.Now;
dateTime.ToString();
C# VS 2008/2005 - Dianlogue box button selection. Simple.
I have a YES or NO Dialogue box and when the users selects YES or NO they get another dialogue box informing them of their selectio...
Hi,
How do I Check in C# if the file "a.doc" Exist in the folder "c:\xxx\qqq"
thnx
Hello experts:
I'm trying to load the load test.xls contents thru c# code so that I can update some data base fields:
My code is below:
public class BankParserClass
Excel.Application e...
This is my lame excuse for a routine to remove special characters from a string (I just want the spaces preserved so I can then turn it into a CamelCase variable name... is there a better way?...
is there anyway to send mail using yahoo or hotmail or others mail server?
here my code,
System.Web.Mail.MailMessage message=new System.Web.Mail.MailMessage();
message.From="xxx@yahoo....
Exception Details: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC.
Source Error:
Line 32: xlApp.Visible = true;
Line 33: string strFileName = s...
Hi all,
I am trying to run a .bat file which in turn contains a command for an application. here is my code.
--------------------
string filepath2 = strArray[2] + "\\myCmd...
I am using a variable in my code which is a datetime.
I need to convert this to a format which is "yyyy-mm-dd".
How could i do this in c#.
Here is my code
private DateTime DateofBirt...
Hi,
Lets say I have a text file.
Always when I try to write to it with the following code, It erases what was already in it:
// create a writer and open the file
...
Hi,
I want to find the ratio of 2 numbers. For example,
the ratio of 150 and 200 is 3:4 (I dont want a single fractional value like 0.75. I want a ratio).
Similarly the ratio of 550 and...
I have been asked to take an online exam by a company called http://proveit.com/
in the areas of C# and ASP.Net
I am not looking for sample questions or anything unethical.
Just lookin...
Hi,
I have a class called Settings and I have this method in there:
public enum Scope
{
scopeone = 0,
scopetwo = 1,
scopethree = 2
}
public Settings.Scope SelectScope
{
get...
Hi all,
I have an .NET EXE file .
I want to find the file created date and modified date in C# application. Can we do it through reflection or with IO stream?
Thanks
Adib
I have a tag value as string in my program....I want to search that Tag value in Tree control and want to select/expand the node with that Tag value. C# please!!!
I am trying to learn how to work with XML better... please help me figure out how to do this example. There are certain elements that have child elements - I don't want to display them or the...
I have a double, db1, that needs to be rounded like so:
123.12 - > fine
123.123 - >123.13
Anything passed the second digit after the decimal gets rounded up 1 digit and parsed to only s...
Is there property I can set so that I can use the open file dialog to select only a directory? Or is there a similar control I can use? ( I seem to remember doing in VB, is there an a simila...
i am using SendKeys.Send("{tab}"); in the key press event of a text box to move to the next textbox by pressing ENTER key
This is working fine, but i am getting an error beep. can anybody p...
In one of my forms, If I hit enter, it automatically hits the button that is highlighted rather than the text box that is currently selected. I have tried setting the property of the text box...
How do I use an OR statement? I am trying to say IF this or this then do this. Here is what I have not working with the ||.
if (cboEstimateStage.DataTextFormatString == "Lockdown") || (cb...
hi i have a list in c#. i have sorted it by effective date using the following code.
MyList.Sort(delegate(ListItem li1, ListItem li2) { return li1.EffectiveDate.CompareTo(li2.EffectiveDate...
I'm starting to try to fully take advantage of the very powerful "DataSet" structure in .net. I've learned a few things in the last few days, like how to get child rows based on a relationshi...