最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp.net 获取url参数值代码
时间:2011-04-29 编辑:简简单单 来源:一聚教程网
asp教程.net 获取url参数值代码
file: default.aspx.cs
using system;
using system.data;
using system.configuration;
using system.collections;
using system.web;
using system.web.security;
using system.web.ui;
using system.web.ui.webcontrols;
using system.web.ui.webcontrols.webparts;
using system.web.ui.htmlcontrols;public partial class querystringsender : system.web.ui.page
{
protected void page_load(object sender, eventargs e)
{}
protected void cmd_click(object sender, eventargs e)
{
response.redirect("nextpage.aspx" + "?version=" +
((control)sender).id);
}
}file: nextpage.aspx
<%@ page language="c#"
autoeventwireup="true"
codefile="nextpage.aspx.cs"
inherits="querystringrecipient" %>
untitled page
file: nextpage.aspx.cs
using system;
using system.data;
using system.configuration;
using system.collections;
using system.web;
using system.web.security;
using system.web.ui;
using system.web.ui.webcontrols;
using system.web.ui.webcontrols.webparts;
using system.web.ui.htmlcontrols;public partial class querystringrecipient : system.web.ui.page
{
protected void page_load(object sender, eventargs e)
{
lbldate.text = "the time is now:
" + datetime.now.tostring();
switch (request.querystring["version"])
{
case "cmdlarge":
lbldate.font.size = fontunit.xlarge;
break;
case "cmdnormal":
lbldate.font.size = fontunit.large;
break;
case "cmdsmall":
lbldate.font.size = fontunit.small;
break;
}
}
}
file: default.aspx
<%@ page language="c#" autoeventwireup="true" codefile="default.aspx.cs" inherits="querystringsender" %>
untitled page
-
上一个: asp.net C#时区转换二个实例
-
下一个: asp.net 文件类型列表
相关文章
- C#复制数组的两种方式及效率比较解读 10-24
- ASP.NET Identity用法解析 10-24
- ASP.NET MVC使用Identity增删改查用户介绍 10-24
- C语言中atoi函数模拟实现介绍 10-18
- .Net反向代理组件Yarp用法介绍 10-10
- .NET使用YARP通过编码方式配置域名转发实现反向代理教程 10-10