Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. dynamic values in the string

dynamic values in the string

Scheduled Pinned Locked Moved ASP.NET
questionhelptutorial
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    ybasha
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • Y 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

      S Offline
      S Offline
      Sandeep Akhare
      wrote on last edited by
      #2

      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... "

      Y 1 Reply Last reply
      0
      • S Sandeep Akhare

        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... "

        Y Offline
        Y Offline
        ybasha
        wrote on last edited by
        #3

        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

        S 1 Reply Last reply
        0
        • Y 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

          S Offline
          S Offline
          Sandeep Akhare
          wrote on last edited by
          #4

          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... "

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups