Click here to Skip to main content
15,919,879 members
Home / Discussions / C#
   

C#

 
GeneralRe: Save the selected items on txt file Pin
J4amieC1-Feb-08 5:29
J4amieC1-Feb-08 5:29 
GeneralRe: Save the selected items on txt file Pin
Strategic_Thinker1-Feb-08 5:40
Strategic_Thinker1-Feb-08 5:40 
GeneralRe: Save the selected items on txt file Pin
Not Active1-Feb-08 5:45
mentorNot Active1-Feb-08 5:45 
GeneralRe: Save the selected items on txt file Pin
DaveyM691-Feb-08 7:26
professionalDaveyM691-Feb-08 7:26 
GeneralRe: Save the selected items on txt file Pin
Not Active1-Feb-08 8:43
mentorNot Active1-Feb-08 8:43 
GeneralRe: Save the selected items on txt file Pin
DaveyM691-Feb-08 9:39
professionalDaveyM691-Feb-08 9:39 
GeneralRe: Save the selected items on txt file Pin
Strategic_Thinker1-Feb-08 10:06
Strategic_Thinker1-Feb-08 10:06 
GeneralProblem Regarding this code Plz help me (currency converson) Pin
satya461-Feb-08 0:51
satya461-Feb-08 0:51 
//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..
--------------------------------------------
GeneralRe: Problem Regarding this code Plz help me (currency converson) Pin
DaveyM691-Feb-08 1:35
professionalDaveyM691-Feb-08 1:35 
QuestionHow does the VS resouce editor work? Pin
Kri51-Feb-08 0:12
Kri51-Feb-08 0:12 
AnswerRe: How does the VS resouce editor work? Pin
Rob Philpott1-Feb-08 1:08
Rob Philpott1-Feb-08 1:08 
GeneralRe: How does the VS resouce editor work? Pin
Kri51-Feb-08 3:55
Kri51-Feb-08 3:55 
AnswerRe: How does the VS resouce editor work? Pin
Cranky1-Feb-08 2:07
Cranky1-Feb-08 2:07 
GeneralRe: How does the VS resouce editor work? Pin
Kri51-Feb-08 3:45
Kri51-Feb-08 3:45 
Questionhow to calculate then network bandwidth utilization? Pin
Tahir Abbasi1-Feb-08 0:08
Tahir Abbasi1-Feb-08 0:08 
GeneralFloat in Scientific format Pin
yassinea31-Jan-08 23:50
yassinea31-Jan-08 23:50 
GeneralRe: Float in Scientific format Pin
stancrm1-Feb-08 0:30
stancrm1-Feb-08 0:30 
GeneralRe: Float in Scientific format Pin
Skippums1-Feb-08 1:07
Skippums1-Feb-08 1:07 
GeneralRe: Float in Scientific format Pin
yassinea1-Feb-08 1:19
yassinea1-Feb-08 1:19 
GeneralRe: Float in Scientific format Pin
Skippums1-Feb-08 1:27
Skippums1-Feb-08 1:27 
GeneralRe: Float in Scientific format Pin
J4amieC1-Feb-08 1:31
J4amieC1-Feb-08 1:31 
GeneralRe: Float in Scientific format Pin
yassinea1-Feb-08 1:36
yassinea1-Feb-08 1:36 
GeneralRe: Float in Scientific format Pin
J4amieC1-Feb-08 2:27
J4amieC1-Feb-08 2:27 
GeneralRe: Float in Scientific format Pin
yassinea1-Feb-08 23:30
yassinea1-Feb-08 23:30 
Generalscrollbar positioning Pin
razanabanu31-Jan-08 23:16
razanabanu31-Jan-08 23:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.