c# - Please resolve this error for me -


protected void page_load(object sender, eventargs e) {     dataset ds = new dataset();     ds.readxml(server.mappath(@"c:\users\raymond\documents\visual studio 2010\websites\website17\xmlfile.xml"));     repeater1.datasource= ds;     repeater1.databind(); } 

i getting error message:

c:/users/raymond/documents/visual studio 2010/websites/website17/xmlfile.xml' is physical path, virtual path expected.

as exception tells you: passing physical path c:\\

but

server.mappath expects virtual path ~/


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -