作者sqrt1089 (李崩子)
看板C_Sharp
标题[问题] ASPX 的get取得
时间Wed Jun 4 17:50:32 2014
如标题,
我做了一份网页
档名是 Logging.aspx
如图:
http://ppt.cc/o9Fc
html 那边写 <form id="form1" runat="server" method="get">
然後按下button钮後,是有get了,只是太长,以及参数不是我要的
如图:
http://ppt.cc/8str
PS 我 ID第一栏Label ID 是 Month,第二栏ID 是Day
请问要怎麽修改,网址才能类似 xxx.aspx?Month=4&Day=1 这样?
翻过书,书上是有类似的是说: Request[" "];
谢谢
--
--
▂▂ ▂▂▂
▂▄▅▅▄▆█ _█◣
◢ (●) ◣/\\
丫 │◥  ̄◤
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 115.80.118.113
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/C_Sharp/M.1401875438.A.12D.html
1F:→ rex1224:通常我会用<a href="url?a=1&b=2"></a> 06/04 22:30
2F:推 J002:method不用特别改成get,把 查询_onclick 的内容加上 06/05 00:19
3F:→ J002:response.redirect(string.Format({0}?Month={1}&Day={2}, 目 06/05 00:20
4F:→ J002:前网址, txtMonth.Text, txtDay.Text)); 再去用Request[""]接 06/05 00:22
5F:→ sqrt1089:get it 06/05 10:12