。NET
{
if (Request("action").ToString() == "save") string v = Request("content1").ToString().Replace("</DIV>", "#").Split(char.Parse("#"));
for (int i = 0; i < v.Length; i++) tmpArray = v(i).Split(char.Parse(">"));
string id = tmpArray(1);
string sql = "update div2 set tx = '" + v(i) + "''</div>' where twh ='" + id + "'";
conn.execute(sql);
}
ASP:
<%
if request("action")="save" then
v = split(request("content1"),"</DIV>" )
for i=0 to ubound(v)-1
dim id
tmpArray = split(v(i),">")
id = tmpArray(1)
sql="update div2 set tx = '"& v(i) &"</div>' where twh ='"& id &"'"
conn.execute(sql)
next
end if
%>上面是我自己转的。net 下面是asp的··asp的代码没有问题···。net的就是各种错误了··
PS:content1 是本页里面一个编辑器的传值。。麻烦各位大大了,小弟才来···还没有分··不过日后一定给大大补上··
{
if (Request("action").ToString() == "save") string v = Request("content1").ToString().Replace("</DIV>", "#").Split(char.Parse("#"));
for (int i = 0; i < v.Length; i++) tmpArray = v(i).Split(char.Parse(">"));
string id = tmpArray(1);
string sql = "update div2 set tx = '" + v(i) + "''</div>' where twh ='" + id + "'";
conn.execute(sql);
}
ASP:
<%
if request("action")="save" then
v = split(request("content1"),"</DIV>" )
for i=0 to ubound(v)-1
dim id
tmpArray = split(v(i),">")
id = tmpArray(1)
sql="update div2 set tx = '"& v(i) &"</div>' where twh ='"& id &"'"
conn.execute(sql)
next
end if
%>上面是我自己转的。net 下面是asp的··asp的代码没有问题···。net的就是各种错误了··
PS:content1 是本页里面一个编辑器的传值。。麻烦各位大大了,小弟才来···还没有分··不过日后一定给大大补上··
解决方案 »
- C#接收Zigbee主板发来的信息(串口通信),乱码如何解析?
- 小问题?????
- 如何动态的为“DataGrid”添加“列”???
- [winforms]: 查询数据库年龄段问题
- 水晶报表加载失败,请各位高手指点,谢谢
- 有关数组的问题
- 客户端调用服务器(2003)端EXCEL,总是拒绝服务,有经验的进来!!!
- WinForm 中 数据库里面来了新数据 如何让winform中的那条记录红色闪烁????
- DataSet在Merge之前如何清除已修改或新添加的行?
- 谁知道哪里有 mcad 70-315考试的试题库下载啊?
- 当EXE窗口打开时候自动打开INDEX.HTML 页面,大虾门要怎么实现?
- 使用Outlook的COM模块,对profile的logon方法有问题,不能正确登陆指定的profile,感觉只是对最后一次登陆的profile进行操作,不知为何?
数组表示 v[i], tmpArray[i]..
感觉你要先去研究下C#基本的语法
类型转换不对···
e:\net\save.aspx.cs(19,17): error CS0029: 无法将类型“string[]”隐式转换为“int[]”
e:\net\save.aspx.cs(23,21): error CS0103: 当前上下文中不存在名称“tmparray”
e:\net\save.aspx.cs(23,37): error CS0117: “int”并不包含“Split”的定义
e:\net\save.aspx.cs(24,29): error CS0103: 当前上下文中不存在名称“tmparray”
e:\net\save.aspx.cs(25,59): error CS0103: 当前上下文中不存在名称“i”
e:\net\save.aspx.cs(26,17): error CS0103: 当前上下文中不存在名称“conn”
不过有点贵 99块
给100蹦找了...