首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

传值接收的有关问题

2012-10-21 
传值接收的问题jsJScript codefunction PhotoName() {window.open(FileUpload.aspx?typeJoins, self,

传值接收的问题
js

JScript code
function PhotoName() {                window.open("FileUpload.aspx?type=Joins", "self", "top=200,left=200,height=300,width=610,toolbar=no,menubar=no, align=center,scrollbars=no,Resizable=no,location=no,status=no");

  }

C# code
   <form id="form1" runat="server" action="File.ashx">    <div>        <asp:Button ID="Button1" runat="server" Text="Button"             OnClientClick="PhotoName()"/>       </div>    </form>

单击按钮,js调用PhotoName()方法,打开FileUpload.aspx将type传过去,如何在File.ashx文件中接收该值

[解决办法]
string type= Request.QueryString["type"].ToString();
[解决办法]
在pageload中requst.querystring["type"]
[解决办法]
C# code
string s = context.Request.Form["C1"];//接受表单值post方式            string type = context.Request.QueryString["type"];//Get方式接收
[解决办法]
+1,context.xxx
探讨

C# code
string s = context.Request.Form["C1"];//接受表单值post方式
string type = context.Request.QueryString["type"];//Get方式接收

[解决办法]
探讨

C# code
string s = context.Request.Form["C1"];//接受表单值post方式
string type = context.Request.QueryString["type"];//Get方式接收

热点排行