Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/389.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
获取mailto函数体中大数据的javascript错误_Javascript_C#_Asp.net_Mailto - Fatal编程技术网

获取mailto函数体中大数据的javascript错误

获取mailto函数体中大数据的javascript错误,javascript,c#,asp.net,mailto,Javascript,C#,Asp.net,Mailto,我想在邮箱正文中显示存储在数组列表中的数据。然后,用户可以根据自己的方便将邮件ID添加到:并发送邮件。 但当大量数据被发送到body时,它会抛出JavaScript错误 以下是.aspx页面的测试代码: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text

我想在邮箱正文中显示存储在数组列表中的数据。然后,用户可以根据自己的方便将邮件ID添加到:并发送邮件。 但当大量数据被发送到body时,它会抛出JavaScript错误

以下是.aspx页面的测试代码:

<html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title> 
        <script type="text/javascript">
        function mail()
             {
                 var array_store;
                 array_store = document.getElementById("array_store");
                 var vs = array_store.value;
                 window.location.href = "mailto: &body=" + encodeURIComponent(decodeURIComponent(vs));
             }
         </script>
    </head>
    <body>
        <form id="form1" runat="server">

        <asp:Button ID="Button_mail" runat="server" Text="OpenInMailBox" OnClientClick="mail()" />

        <input type="hidden" id="array_store" name = "ArrayStore" value = '<%=this.ArrayStore %>'  />

        </form>
    </body>
</html>

功能邮件()
{
变量数组存储;
数组存储=document.getElementById(“数组存储”);
var vs=数组_store.value;
window.location.href=“mailto:&body=“+encodeURIComponent(解码uricomponent(vs));
}
代码.CS页:

public partial class mailto_check : System.Web.UI.Page
{
    protected System.Text.StringBuilder ArrayStore = new System.Text.StringBuilder();
    string str = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        ArrayList al = new ArrayList();
        al.Add("Test1");
        al.Add("hello ");
        al.Add("Testing");

        try
        {
            for (int y = 0; y < al.Count; y++)
            {
               str = al[y].ToString();
               this.ArrayStore.Append(str+",%0D");
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.ToString());
        }
    }
}
公共部分类邮件检查:System.Web.UI.Page
{
受保护的System.Text.StringBuilder ArrayStore=新的System.Text.StringBuilder();
字符串str=“”;
受保护的无效页面加载(对象发送方、事件参数e)
{
ArrayList al=新的ArrayList();
新增(“测试1”);
加上(“你好”);
添加(“测试”);
尝试
{
对于(int y=0;y
对于大数据,我通过向数组列表添加值来测试它。 请帮我做这个。
提前感谢您的肯定回答

错误信息是什么我不明白,您需要一个大的电子邮件正文还是一个大的TOs列表?限制来自Windows和您正在使用的邮件客户端,如果您需要大正文文本,则不希望使用mailto:@AdrianoRepetti邮件正文包含电子邮件地址。@Jeremythonpson,感谢您宝贵的时间。对于大数据,它会显示一个带有文本“Javascript运行时错误”的弹出框。邮件正文包含列表的值。没有添加电子邮件地址。@AdrianoRepetti,感谢您查看此问题,我有一个大列表,我将这些列表值作为字符串发送到邮件正文。对于小字符串,mailto有效,但对于大值无效。如果mailto没有用,请建议我一个替代方案。提前谢谢。