|
Thanks !
_________________________
Kri5
|
|
|
|
|
Microsoft hired Harry Potter to write it.
Sorry, couldn't resist...
|
|
|
|
|
hehe..
_________________________
Kri5
|
|
|
|
|
hi to all!
I m implementing Bandwidth monitor and i don't know i can do this.
I want to know how i can determine the network packet size and
want to calculate the network bandwidth usage .
can anyone tell me how i can determine the incoming or out going packet size in c# and what is the formule to calculte the bandwidth usge ?
thanks to all.
Tahir
|
|
|
|
|
Hi,
Please, I'm using SQL Server and stored procedures which generates many numerical values (floats).
I'd like to know, using Visual C#, how to format these values into one of the two following formats: #,##E+## or #,##E-##
Thank you so much in advance !
|
|
|
|
|
float f = 1.23456789F;
Console.WriteLine(f.ToString("E2"));
|
|
|
|
|
Custom Numeric Format Strings[^]
Standard Numeric Format Strings[^]
In your case, you would make a call like the following:
float f = 178.92;
string res = f.ToString("0.00E+00");
Note that the decimal point is always coded as '.' even though on your machine it will appear as a ','. Hope this helps,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Thank you so much, it works very well !
By the way, do you know if it is possible to do it directly by my stored procedures ?
|
|
|
|
|
I don't know anything about stored procedures. Perhaps you could post in the SQL forum to see if there is a way to do that.
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
why would you want a stored proc to do this? Stored procs are for retrieving data, not formatting it for display.
|
|
|
|
|
because, now, I'm using GridViews which are databinded directly by stored procedures. So if it is possible to format my results inside my stored procedures before databinding, it will be much more simpler for me !!!
|
|
|
|
|
no, its not because you have exactly the same formatting ability when databinding
Eval("myNumericNumber","E2")
|
|
|
|
|
Hi,
I have just did the test: it seems to be not working very well ?!
As result, I have "E2" !
Are you sure that using Eval("myNumericNumber", "E2") when databinding gives the same result that formatting in C# by: myNumericNumber.ToString("E2") ?
|
|
|
|
|
Hi,how can i maintain the position of the scrollbar on ostback.
Page.MaintainScrollPositionOnPostBack = true;
i tried,its not working for me....
im using updatepanel...
Hi,Im Razana
|
|
|
|
|
hi
iam new to .net.can anyone tell me how to do paging in datalist and also i want to display like
"page 6 to 10 of 100" information in the footer.can anyone tell me how to do this?
Thanx in advance
pintoo
|
|
|
|
|
Hi,
I created a project in c#.net using MySql as database. I created a setup and installed it into another client machine but at the time of installation i need to check whether MySql database exist in the client machine.Is this possible in C#.net? Plz Help Me
Thanks in Advance
Smithakrishnan
|
|
|
|
|
connect the database , it will throw the exception,
from the exception you can easily find, the database is not found!.
|
|
|
|
|
I want to copy the subitems in a Listview, then I found it does not support this function?
how to do then?
thanks.
|
|
|
|
|
Overload the keypress and keydown messages for the listview, then listen for the event "Ctl-C". Once the event occurs, copy the selected contents to the clipboard. You could also add a context menu to the list view, and have copy as an option within the dropdown. On click, you would do the same thing as when the user presses Ctl-C. Hope this helps,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
On closing the form i need to save some data so in which event should i call the function to save data.
i am doing it inside Form1_FormClosed();
but if the data is not proper it should return from there..it is returning but closing the form.
Is there any handler which gets called before Form1_FormClosed() event.
ThankXXX In Advance.
Truth Is The Simplest !!!!
|
|
|
|
|
FormClosing...
|
|
|
|
|
You can write that code in FormClosing() and set the FormClosingEventArgs.Cancel property to true.
I don't mean to be harsh, but the very first result for cancel formclosed[^] brings up the answer.
Cheers,
Vikram.
"I will put my new found knolage to good use" - Captain See Sharp.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed." - Gary Wheeler.
|
|
|
|
|
Hi Friends..
I nee to get Mac address of a Remote machine for which i am using VC++ dll method("iphlpapi.dll") to do so..I am using the followin C# code to get the MAC Address..
public class clsMacAdd
{
[DllImport("iphlpapi.dll", ExactSpelling=true)]
public static extern int SendARP( int DestIP, int SrcIP, [Out] byte[] pMacAddr, ref int PhyAddrLen );
public static string GetMacaddress(string strHostName)
{
System.Net.IPHostEntry Tempaddr = null;
string[] Ipaddr = new string[3];
//strHostName = Request.UserHostName;
if ( strHostName == "127.0.0.1" )
{
strHostName = "system102";
}
Tempaddr = (System.Net.IPHostEntry)Dns.GetHostByName( strHostName );
System.Net.IPAddress[] TempAd = Tempaddr.AddressList;
foreach(IPAddress TempA in TempAd)
{
Ipaddr[1] = TempA.ToString();
byte[] ab = new byte[6];
int len = ab.Length;
// This Function Used to Get The Physical Address
//int r = SendARP(int(TempA.Address), 0, ab, ref len );
int r = SendARP( (int) TempA.Address, 0, ab, ref len );
string mac = BitConverter.ToString( ab, 0, 6 );
return mac;
}
return null;
}
}
}
I am getting the MAC address when i run in enterprise network(local),but when i host it a web server(live) i couldn't get the MAC Address..Wat could be the problem..? Someone help in this regard as early as possible..
Regards,
Balaguru
|
|
|
|
|
I have N numbers of object floating inside of WPF window. I can rotate any object through by selecting with combo box and then by pressing a button. It works fine, but it is not maintaining its position. When second time I want to rotate it does not move, which implies that after rotating it did not keep the latest position.
For just debug purpose I change the angle, but still it rotated from its starting position, but not from last position.
How we can animate (from angle 0 to 90)? Do I need to write storyboard for each object in XAML? Looks odd! Or is there way to write dynamically storyboard.
Your prompt answer will be very much appreciated.
Agha.khan@hotmail.com
|
|
|
|
|
The problem might be the following:
after assigning an animation to a element the animation will run to it's endpoint and stay there!
So if you try to change the propertie (say angle) itself it won't have any effect to the element cause the animation is still in place and has precedence.
So either you remove the animation (just assign a null animation) or you plug another animation on top (I advise removing animations after they run through - just don't forget to save/reset the changed values)
|
|
|
|