现在我改进一个系统,原来这个系统是由asp编写的,系统比较大,所以我先更改一部分的asp页面为asp.net,现在遇到问题了。
我需要在新的asp.net页面处理完毕后,再把数据收集起来再交给旧的asp页面处理,这样才能保证系统的数据一致性,即是form里面的数据要进行二次处理,我在新的asp.net页面后台获取前台的数据处理完毕后,我再要提交给旧的asp页面,这个问题怎么解决?可以在后台的c#代码里面调用旧的asp页面处理吗?关键是form里面的参数怎么传递给旧的asp页面,新的asp.net页面的前台的input的name和旧的是不同的。
谢谢!
我需要在新的asp.net页面处理完毕后,再把数据收集起来再交给旧的asp页面处理,这样才能保证系统的数据一致性,即是form里面的数据要进行二次处理,我在新的asp.net页面后台获取前台的数据处理完毕后,我再要提交给旧的asp页面,这个问题怎么解决?可以在后台的c#代码里面调用旧的asp页面处理吗?关键是form里面的参数怎么传递给旧的asp页面,新的asp.net页面的前台的input的name和旧的是不同的。
谢谢!
解决方案 »
- 高手帮忙看一下,GridView控件....我吐得了
- vs2005sp1前后
- asp.net数据绑定时在前台执行判断
- JS如何给DotNetTextBox赋值啊???
- GridView显示IP问题
- 请问怎样从客户端获取下拉框的Text值????
- 调用ActiveX控件时,classid怎么确定,或是怎样查看classid
- 请求高手帮助?
- 请教asp.net中关于treeview控件的问题,在线等
- 请问谁有从数据库填充DropDownList控件的例子, 这个DropDownList是要在DataList的EditItemTemplate中的,谢谢!
- 各位大哥,出手把,100分奉上
- 打开dbf文件的问题(这问题已经问了一年多,还没有解决)
string strjs = "<script>window.open('*.asp?var="+var;
strjs +="',null,'";
strjs +=");</script>";Response.Write (strjs);
idx=Request("id")
a1=Request("a1")
a2=Request("a2")
a3=Request("a3")
a4=Request("a4")
a5=Request("a5")
a6=Request("a6")
a7=Request("a7")
a8=Request("a8")
.....
string strUrl = "http://localhost/ffok/11.asp";
byte[] data = System.Text.Encoding.ASCII.GetBytes(postData);
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(strUrl);
myRequest.Method = "POST";
myRequest.ContentType="application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length; Stream newStream=myRequest.GetRequestStream();
newStream.Write(data,0,data.Length);
newStream.Close();响应的asp网页代码:
<%
db_path = "ffok.mdb"
Set conn= Server.CreateObject("ADODB.Connection")
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(db_path)
conn.Open connstr
Set rs = Server.CreateObject ("ADODB.Recordset")
dim aa
aa = Request("aa") + "11"
sql = "Select * from ab"
rs.Open sql,conn,3,2
rs.addnew
rs("a")=aa
rs("b")="asdf"
rs.update
rs.Close
%>在11.asp下建一个access数据库,建一个表ab,里面有两个字段a和b
自己测试下吧。附加msdn的一段代码:(关于ContentType)
// Set the 'Method' property of the 'Webrequest' to 'POST'.
myHttpWebRequest.Method="POST";
Console.WriteLine("\nPlease enter the data to be posted to the (http://www.contoso.com/codesnippets/next.asp) Uri :");
// Create a new string object to POST data to the Url.
string inputData=Console.ReadLine();
string postData="firstone="+inputData;
ASCIIEncoding encoding=new ASCIIEncoding();
byte[] byte1=encoding.GetBytes(postData);
// Set the content type of the data being posted.
myHttpWebRequest.ContentType="application/x-www-form-urlencoded";
// Set the content length of the string being posted.
myHttpWebRequest.ContentLength=postData.Length;
Stream newStream=myHttpWebRequest.GetRequestStream();
newStream.Write(byte1,0,byte1.Length);
Console.WriteLine("The value of 'ContentLength' property after sending the data is {0}",myHttpWebRequest.ContentLength);
// Close the Stream object.
newStream.Close();