dynamic values in the string
-
Hi there, i have a function which store value of document path, in my web application i have two path for example 1. path one domainname\jp\xyz 2. path two domainname\sg\xyz the application able to get the location path of number 2 and it function is use to delete that path folder. when the user from the jp domain try the function thro error the document path cannot found? how can i assist the string a dynamic value? since it taken value from web config This is the function public string GetPostLocation(string strDocumentNumber) { int intTypeLength =0 ; string strPostLocation = string.Empty; try { if(strDocumentNumber.Trim().Length == 16) intTypeLength =1; else if(strDocumentNumber.Trim().Length == 17) intTypeLength = 2; strPostLocation = _postFolder; } catch(Exception ex) { throw ex; } return strPostLocation; } any suggestion please regards Ybasha
-
Hi there, i have a function which store value of document path, in my web application i have two path for example 1. path one domainname\jp\xyz 2. path two domainname\sg\xyz the application able to get the location path of number 2 and it function is use to delete that path folder. when the user from the jp domain try the function thro error the document path cannot found? how can i assist the string a dynamic value? since it taken value from web config This is the function public string GetPostLocation(string strDocumentNumber) { int intTypeLength =0 ; string strPostLocation = string.Empty; try { if(strDocumentNumber.Trim().Length == 16) intTypeLength =1; else if(strDocumentNumber.Trim().Length == 17) intTypeLength = 2; strPostLocation = _postFolder; } catch(Exception ex) { throw ex; } return strPostLocation; } any suggestion please regards Ybasha
Only suggestion that i can give try to debugg your application as i am not getting your requirements so debugg t and see what the parameter value is ?
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Only suggestion that i can give try to debugg your application as i am not getting your requirements so debugg t and see what the parameter value is ?
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
hi sandeep, Thanks for ur suggestion i already debug and when i use the application for sg domain name the function show me the file in and it delete the document nos which i pass where as when i use the function from jp domain it thro error the document nos is not found. i think when am using the jp domain it still read the value from where is suppose to read the path from my question is how to assign the dynamic value to a string? hope this is clear. regards ybasha
-
hi sandeep, Thanks for ur suggestion i already debug and when i use the application for sg domain name the function show me the file in and it delete the document nos which i pass where as when i use the function from jp domain it thro error the document nos is not found. i think when am using the jp domain it still read the value from where is suppose to read the path from my question is how to assign the dynamic value to a string? hope this is clear. regards ybasha
try to use Server.MapPath("jp/"); relative path don;t give domain name Might be your file structure is not proper or missing something Sorry but i am really confused of domain .. but
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "