各位大神帮看看,为什么总是指定的参数已超出有效值的范围。

windspeedky windspeedky 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
代码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;
using System.Configuration;

public partial class Main : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
using (OleDbConnection olecon = new OleDbConnection(ConfigurationManager.ConnectionStrings["conn"].ToString()))
{
string name = Session["name"].ToString();

{
try
{
olecon.Open();
OleDbCommand oledbcommand = new OleDbCommand("select * from StudentInfo where StudentId='" + name + "'", olecon);
OleDbDataReader da = oledbcommand.ExecuteReader();
this.GridView1.DataSource = da;
this.GridView1.DataKeyNames = new string[] { "StudentId" };
this.GridView1.DataBind();
da.Close();
}
catch (Exception)
{
throw;
}
}
}
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
}
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
string A = GridView1.DataKeys[e.RowIndex].Value.ToString();
string B = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[1].Controls[0])).Text.ToString().Trim();
string C = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[2].Controls[0])).Text.ToString().Trim();
string D = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[3].Controls[0])).Text.ToString().Trim();
string E = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[4].Controls[0])).Text.ToString().Trim();
string F = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[5].Controls[0])).Text.ToString().Trim();
string G = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[6].Controls[0])).Text.ToString().Trim();
string H = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[7].Controls[0])).Text.ToString().Trim();

string s = "update StudentId='" + A + "',StudentName='" + B + "',Sex='" + C + "',DateOfBirth='" + D + "',Specialty='" + E + "',Email='" + F + "',Root='" + G + ",PassWord='" + H + "'";
Response.Write("<script language=javascript> alert('数据更新成功!');window.location='ManagerNews.aspx'</script>");




}
}
...全文

相关推荐

指定的参数已超出有效值的范围参数名: utcDate

指定的参数已超出有效值的范围参数名: utcDate 说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.ArgumentOutOfRangeException: 指定的参数已超出有效值的范围。 参数名: utcDate 源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪: [ArgumentOutOfRangeException: 指定的参数已超出有效值的范围。 参数名: utcDate] System.Web.HttpCachePolicy.UtcSetLastModified(DateTime utcDate) +3352419 System.Web.HttpCachePolicy.SetLastModified(DateTime date) +47 System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +1904 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64 解决办法: 1.可能是修改服务器系统时间所导致,更改服务器系统时间后,重新编译。

wangtaoymf

AD637有效值检测模块

这是AD637有效值检测模块,网上找的。

weixin_38977807

傅里叶分解计算基波有效值相位角和各次谐波的有效值和相位角

傅里叶分解计算基波有效值相位角和各次谐波的有效值和相位角

xiaoshahai

AD637讲解及电路图.rar 真有效值检测

AD637很好的真有效值检测电路!我就是照图作出的:测试的比例关系,三角波1.716---1,方波1--1,正弦波1.46--1.

liuyang19870715

任意波形有效值任意波形有效值

任意波形有效值:电流有效值的计算方法一般分为模拟法和数值法两类。模拟法中,由于焊接电有效值的数学模型需要经过模拟电路的积分、平方和开平方等运算,使得电路比较复杂,检测误差比较大。

wanglujiwqq
评论 5
收藏 已收藏
分享
返回顶部
windspeedky
C# 111,129 成员 642,538 内容