本文介绍了如何在C#中直接传递ScriptManager.RegisterClientScriptBlock中的字符串值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hi Geeks 只是一个小小的验证。字符串值不会完全传递给下面的代码。 这是错的吗?
Hi Geeks Just a small verification. string values doesn't pass exactly to the below code. Is this wrong?
string characters="/;*?<>|"; ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('A file Name cant contain any of the operators'"+characters+"')", true);建议我如何传递字符串值? 提前致谢
Suggest me how to pass string values? Thanks in advance
推荐答案试试这个: Try this: string script = @"alert('A file name cannot contain any of the operators \'/;*?<>|\'')"; ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", script, true);
更多推荐
如何在C#中直接传递ScriptManager.RegisterClientScriptBlock中的字符串值
发布评论