html - C#/ASP.NET: HREF Path not updating after code-behind change -


i'm working on website company allow house , distribute .xml , .htm perfmon templates. site consists of creator tool used create templates , repository templates stored. when user hits repository site , chooses view either xml or htm templates, page looks in directory (~/perfmon templates/) , lists out of files of type user specified. creates hyperlink file , parses file list counters included in template. working without issue on local machine. yesterday, published website iis7 server running asp.net 4.6.

after publishing, while testing site, found hyperlinks in repository no longer working. because path changed ever ~/perfmon templates/ ~/perfmon/perfmon templates. opened c# code behind repository webpage , changed relative path hyperlink reflect path changes. after copying .cs code behind file , .aspx page file server, ran test again , found no change in hyperlink path.

my first thought, @ point, c# file must getting cached somewhere tried ctrl+f5 on browser see if corrected issue. did not.

so went local copy have on machine , tried run updated page in debug mode on local machine. set break points hyperlinks created , insured relative path on hyperlinks pointing updated location. started debugging found site not processing breakpoints @ regardless of whether chose start debugging debug menu or if clicked play button start it.

after didn't work, tried commenting out of lines of c# code control creation of hyperlinks , restarted debugging. shock , surprise, old hyperlink path still present on page.

it seems page not reading c# code-behind file, know has getting code somewhere , code-behind file location in solution hyperlink path mentioned.

here code c# code behind file controls creation of hyperlink. i'm not sure resolve problem though since have commented of out @ 1 point , still didn't make difference.

hyperlink filelink = new hyperlink();         filelink.navigateurl = "~/perfmon/perfmon templates/" + f.name.tostring();         filelink.text = f.name.tostring();         filelink.visible = true;         filelink.style.add("color", "#111111");         filelink.style.add("text-decoration", "none");          string perfcounterlist = string.join(environment.newline, counters);         string perfcounters = regex.replace(perfcounterlist, @"\r\n?|\n", "<br />");         //dt.rows.add(count, "<a href='/perfmon/perfmon templates/" + f.name.tostring() + "'>" + f.name.tostring() + "</a>", perfcounters);         dt.rows.add(count, filelink, perfcounters);  

can please point me going wrong? i've checked web.config file insure debugging enabled. i've tried ctrl + f5 trick see if browser cache interfering. neither of things seem @ all. there else can try?

problem caused changing build output directory , not moving build files new build location server.


Comments