错误:无法生成临时类(result = 1)...在Web服务上调用方法时.我正在使用VS 2008 C#ASP.NET 3.5.我正在为我的应用程序调用远程Web服务.
Server Error in '/' Application.
Server was unable to process request. ---> Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\WINDOWS\TEMP\6sbkwt2d.0.cs' could not be found
error CS2008: No inputs specified
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> …
Run Code Online (Sandbox Code Playgroud) 什么是asp.net中的字母和数字的正则表达式验证器?
我只需要输入0-9,az和AZ.我不想允许任何特殊字符单引号或双引号等.我使用的是asp.net 3.5框架.
我试着^[a-zA-Z0-9]+$
和^[a-zA-Z0-9]*$
.他们没有工作.
任何帮助将不胜感激.
如何检查列表框中是否已存在某个项目?
我正在使用VS 2008 ASP.NET 3.5框架C#.我用了以下代码......
if (ListBox1.Items.Contains(drp_branch.SelectedItem.Value + "-" + txt_acc_no.Text))
{...}
Run Code Online (Sandbox Code Playgroud) 我访问托管的Web应用程序时遇到此错误(在VS2008 C#ASP.NET 3.5 Framework中)
验证视图状态MAC失败.如果此应用程序由Web场或群集托管,请确保配置指定相同的validationKey和验证算法.AutoGenerate不能在群集中使用.
有趣的是,如果我们在登录过程后继续,则没有问题.如果您登录并在15或20分钟内不执行任何操作,则单击任何菜单...将生成此错误.所以我怀疑它与会话有关.在我的webconfig文件中,我按如下方式编写了会话超时.
<sessionState timeout="15" />
Run Code Online (Sandbox Code Playgroud)
我该如何更正此错误?
地址文本框中有单引号和双引号.如何插入数据库.我正在使用SQL2005.我的代码如下......
str = "exec sp_cust_reg '" + customer.Cust_Id + "','" + customer.Cust_Name + "','" + customer.Gender + "','" + customer.Acc_no + "','" + customer.Address + "','" + customer.Pin_no + "','" + customer.Phone_no + "','" + customer.Mobile_no + "','" + customer.Email + "','" + customer.Authorise + "'";
Run Code Online (Sandbox Code Playgroud)
地址是jo"hn's house
它的Text Visualizer如下......
exec sp_cust_reg 'C7','George Joseph','Male','0001-212123','jo"hn's house','515151','04862787896','8888888888','johnyqw@gmail.com','N'
Run Code Online (Sandbox Code Playgroud)
我用了
string sql = str.Replace("\'", " ");.
Run Code Online (Sandbox Code Playgroud)
然后我明白了
exec sp_cust_reg C7 , George Joseph , Male , 0001-212123 , jo"hn s house , 515151 , …
Run Code Online (Sandbox Code Playgroud) 可能重复:
如何将String拆分为多个值?
我有一个字符串0001-102525.我想把它分成0001和102525.How我能做到吗?问候,
asp.net ×6
c# ×5
listbox ×1
regex ×1
session ×1
sql-server ×1
string ×1
validation ×1
web-services ×1