|
Handle the selected event and write it to your file.
It would be nice also if you took out all the empty space on your signature line
only two letters away from being an asset
|
|
|
|
|
Hello :
Thank you very much for your intersting , but can you give me an example to do that or explain the steps to do that ,please......
Thanks
|
|
|
|
|
How about at least try something on your own? What part are you having difficulties with? Handling an event? Writing to a file? What? These are not complex topics.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: What part are you having difficulties with
Perhaps it was the "taking all the empty lines out your sig" part.
|
|
|
|
|
Hello :
I'll try it myself , but I want to know how can I start deal with handles and write to a file ......
Thanks
|
|
|
|
|
There is a little textbox at the top of the page, the one that has Search next to it. You should try it.
If you find that difficult, perhaps another career would be better.
Take the empty lines out of your signature.
only two letters away from being an asset
|
|
|
|
|
This should get you started.
void button1_Click(object sender, EventArgs e)
{
foreach (Control thisControl in Controls)
{
if (thisControl is RadioButton)
{
RadioButton thisButton = (RadioButton)thisControl;
if (thisButton.Checked)
{
string path=Environment.GetFolderPath(
Environment.SpecialFolder.LocalApplicationData
) + "\\test.txt";
TextWriter textWriter = new StreamWriter(path);
textWriter.WriteLine(thisButton.Name);
textWriter.Close();
Console.WriteLine("Data written to " + path);
break;
}
}
}
}
Now use this to get yourself going and post back with a more specific issue if one arises - and alter that signature!
|
|
|
|
|
Rather than learning some very simple techniques, all he has to to do is copy your code. Hope you will always be around for him. Give him a fish, feed him for a day; teach him to fish...
only two letters away from being an asset
|
|
|
|
|
I take your point and I agree totally, but if he is to learn some simple techniques he needs a starting place. What better place than here? Surely that's part of what CP is about.
You'll notice the code I gave is very vague and pretty much useless. To be put into a pratical situation it would need some significant alteration that would require, and hopefully stimulate, a proper understanding of the code I gave.
|
|
|
|
|
Hello
I want to thank (DaveyM69) about the support, and your advance (Mark Nischalke) is nice but I hope you too when you look at it you didn't copy it, it's a disscusing forum, so what is this forum do if we don't sharing information between us....
Thanks
|
|
|
|
|
//This particular function retreives and displays the currency results of the usered selected input
function DisplayCurrencyValue(link,currency)
{
var str,objXMLNode,objXMLDoc,objEmployee,strHTML;;
var stri=AJAXUtilities.GetCurrencyValue(link,currency);
str = stri.value;
var result=parseFloat(str);
var value=parseFloat(document.getElementById("txtConvert").value)
if(isNaN(value))
{
value=1;
document.getElementById("txtConvert").value=1
}
var city=document.getElementById("ddlTo");
var url=document.getElementById("ddlFrom");
var path=url.options[url.selectedIndex].text;
var pathCurr=url.options[url.selectedIndex].value;
var currencyAbr=pathCurr.substring(pathCurr.length-7,pathCurr.length-7+3);
var curr=city.options[city.selectedIndex].value;
result=result*value;
var str=value+" "+currencyAbr+" = "+ result +" "+curr;
document.getElementById("lblConverResult").value=str;
// document.getElementById("txtConvert").focus();
}
---------------------------------------------------------------
*
*
*
--------------------------------------------------------------
public string GetCurrencyValue(string url, string currency)
{
DataSet ds3 = new DataSet();
ds3.ReadXml(url, XmlReadMode.ReadSchema);
DataTable table = ds3.Tables[3];
string curren = currency.Trim();
string title = "";
string rate = "";
string exchange = "";
string outPut = "";
foreach (DataRow row in table.Rows)
{
title = row["title"].ToString();
int endPoint = title.IndexOf("=");
int startPoint = title.IndexOf("(");
int ePoint = title.IndexOf("(");
rate = title.Substring(endPoint + 2);
exchange = (rate.Substring(0, 3));
if (exchange.Equals(curren))
{
outPut = rate.Substring(5, (rate.Length - 1) - 5);
}
rate = title.Substring(startPoint + 1, 3);
}
decimal tr = Convert.ToDecimal(rate.Substring(0, rate.Length - 1));
tr = tr * 100;
//XmlDocument xmlDoc = new XmlDocument();
return outPut;
}
--------------------------------------------------------------------
-------------------------------------------
Result displaying lick this:
200 USD = NaN INR
plz tell me why hear NaN is displaying..
--------------------------------------------
|
|
|
|
|
NaN - Not A Number?
Try converting all those strings to decimals before doing any calculations and/or comparisons.
|
|
|
|
|
Hi everyone,
I have always held some kind of a fascination with the resource editor in Visual Studio. I could never understand how VS allows a user to drag/resize/modify buttons, edit boxes, and other controls on a dialog inside a window.
Can anyone throw some light on the matter?
Thanks!
_________________________
Kri5
|
|
|
|
|
|
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 !!!
|
|
|
|