Manoj Rawat

Manoj Rawat

  • NA
  • 4
  • 0

VERY VERY INTERSTING QUESTION C# code not running in xslt

Aug 14 2008 5:46 AM
string str=dLatitudeDecimalDegree.ToString("0.0000000000000");
                 int len=str.IndexOf(".");
                 string str2=str.Substring(0,len);
                 iLatitudeGradiant=System.Convert.ToInt32(str2);    
                //iLatitudePrimi = (int)((dLatitudeDecimalDegree - iLatitudeGradiant)*60);
                 double d_iLatitudePrimi = (dLatitudeDecimalDegree - iLatitudeGradiant)*60;
                 string str_iLatitudePrimi=d_iLatitudePrimi.ToString("0.000000000000");
                 int len1=str_iLatitudePrimi.IndexOf(".");
                 string str2_iLatitudePrimi=str_iLatitudePrimi.Substring(0,len1);
                 iLatitudePrimi=System.Convert.ToInt32(str2_iLatitudePrimi);

it is giving exception on substring and convert.ToInt32 when i use in xslt it is showing exception show function has failed. when i remove
substring and convert.ToInt32 from function function works properly. Anyone can solve the problem