dll函数public void myfun(string url)
{
System.Web.HttpContext.Current.Response.Redirect(url);
}
{
System.Web.HttpContext.Current.Response.Redirect(url);
}
解决方案 »
- 串口接收时,拼数据到数组遇到的问题。
- VS2008卸载了,这可怎么办?
- 请教,如何将用C#开发完的类库生成的DLL,转换成在非托管编程环境下可以用COM。
- 被调用的方法有没有什么办法可以获得调用者的对象?
- 无法连接到数据库
- 远程文件同步系统的设计与实现--ftp方式
- 我的系统经常会突然中断出现一个蓝屏,提示ntoskrnl.exe在某地址出错,请教诸位朋友, 非常谢谢!
- 在安装最新的微软更新后,调用COM出错,“因为配置类型不正确,系统无法开始服务器进程。请检查用户名和密码。”?
- 连接SQL2008出错
- [白痴问题]C#以后可以给单片机,嵌入式系统写程序么?
- 我想给程序留个菜单做接口,方便人家做二次开发,具体怎么做,请大家给点思路。
- ArrayList怎么样读取某一个值??
我创建了一个test1.aspx和一个test.cs文件,内容如下,现在希望把test1.aspx的内容submit到test.cs中,test.cs处理test1.aspx提交的变量,请问在test1.aspx中的action部分怎样写?在test.cs中如何把处理结果输出成一个aspx页面?请给新手一个帮助吧。
test1.aspx
<%@ Page language="c#" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" action=test.dll>
User Name:<input type=text name=userid value=HRAdmin> Password: <input type=text name=password value=hradmin>
<br>
<input type=submit name="Submit" value="Submit">
</form>
</body>
</html>
test.cs
using System;
using System.IO;
using System.Web;
using System.Collections;
using System.Collections.Specialized;
using System.Data.OracleClient;namespace test
{
public class Test
{
public Test()
{
HttpContext httpconn =HttpContext.Current;
NameValueCollection allvar= httpconn.Request.Form; string[] arr = allvar.AllKeys; for (int i = 0; i<arr.Length; i++){
Console.Write ("var" + i + ": "+arr[i]);
}
}
}
}