Loading a text file from assets

straybullet

Member
Licensed User
Longtime User
I have included a file... mytext.txt I want to load in to web veiw, but webview says

file://AssetsDir/mytext.txt was not found, there is not such file or directory.



Here is a snippet of my code....

WebView1.Initialize("WebView1")
activity.AddView(webview1,0dip, 0dip, 100%x, 100%y)
url="file:///" & File.DirAssets&"/mytext.txt"



What path should I be using, I thought File.DirAssets was the default path unless you specified otherwise?

Thanks in advance
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…