如何避免给出以下错误? [英] how to avoid given below error ?

查看:109
本文介绍了如何避免给出以下错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一种表格来查找gooogle地图上的细节
我使用文本文件存储数据
然后将每个数据存储在新行中,

现在,当我提交表单时,然后重定向到地图页面
那我就无法获取以表单形式提交的值
我收到类似
的消息

i made one form to locate detail on gooogle map
ane i use text file to store data
and each data are stored in new line then ,

now when i submit form then redirect to map page
then i cant not get values submited in form
and i got message like

this file has been modified outside of source editor.
do you want to reload it ??
yes, yes to all, no, no to all
in popup box in ms visual studio 2010


给我适当的解决方案,以避免出现此消息并立即更改地图....
后端中使用的代码为:


give me proper solution to avoid this message and to get instant change in map....
Used Code in backend is:

 protected void btnSubmit_Click(object sender, EventArgs e)
    {
string path = @"F:\MIXED DATA\MapTEXT\example.txt";
        string message = txtlat.Text + "|" + txtLan.Text + "|" + txtName.Text+"<br>"+ txtNo.Text + "<br>" + txtStreet.Text + "<br>" + txtArea.Text + "<br>" + txtPostalArea.Text + "<br>" + txtCity.Text + "|" + txtName.Text;

       
        string appendText = message + Environment.NewLine;
        File.AppendAllText(path, appendText);
        Response.Redirect("Default.aspx");
        
        string readText = File.ReadAllText(path);
        Console.WriteLine(readText);}

推荐答案

从VS文件列表中删除文本文件:它监视它们,因此如果您的应用程序对其进行了更改在调试会话期间,VS注意到并希望确保它与最新版本一起使用.
Remove the text file from your VS list of files: It monitors them, so if you application changes it during a debug session, VS notices, and wants to make sure it is working with the latest version.


这篇关于如何避免给出以下错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆