解决方案 »
- 在asp.net的框架网页中,如何判断当前页面是否在指定的框架中?
- List<T> 重复记录合并 数量相加
- 为什么asp.net网站放在IIS下新建的文件夹没法访问
- 如何让Gridview中的HyperLinkField列可编辑?
- 请教:------如何在Panel里代码实现回车?-------
- 下载次数累计问题?
- 一个.aspx页面的有个包含文件(也是.aspx),都有后台cs程序,但出现错误
- 如何动态加载多个xml文件
- asp.net动态读取数据库中的字段
- ASP.NET 中关于Request.QueryString的问题
- 高分求好方法 ,分不够再加100
- System.Data.SqlClient.SqlException: 第 1 行: '(' 附近有语法错误。
你应该这样
bdsj()最后加ViewState.Add("ay", ay);Button1_Click(){
if(ViewState["ay"]!=null)
string[] ay=(string[]) ViewState["ay"];
}意思是这样。。不是写的对不
你自己试试。
试了很多方法,结果都没用- -。
最后检查的时候是我的DIV是设为隐藏的- -。
可能是某些小地方没注意,仔细找找吧
string s="";
while (sdr2.Read())
{
ay[i] = sdr2.GetString(0);
s+=ay[i]+",";
}
ViewState["s"]=s.SubString(0,s.Length-1);
protected void Button1_Click(object sender, EventArgs e)
{
string sql2 = "update [Option] set content='" + TextBox2.Text + "' where content= '" + ViewState["s"]!=null?ViewState["s"].ToString().split(',')[0]:"" + "' and vote_id=(select id from dbo.Vote where question='" + question + "')";
string[] ay = new string[3]; //你在这里又定义了一次..
int i = 0;
{
string[] ay 重新定义
使用viewstate保存值为属性