<%@ Page Language="c#" %>
<script Language="c#" runat="server">
void Page_Load(object source, EventArgs e)
{
if (!(IsPostBack))
{
MyButton.Text = "OK";
MyDropDownList.Items.Add("http://www.microsoft.com");
MyDropDownList.Items.Add("http://www.wrox.com");
MyDropDownList.Items.Add("http://msdn.microsoft.com");
}
}
public void Click (object sender,EventArge e)
{
Response.Redirect(MyDropDownList.SelectedItem.Text);
}
</script>
<html>
<body>
<form id="WebForm1" method="post" runat="server">
<asp:DropDownList id=MyDropDownList runat="server"/>
<asp:button id=MyButton runat="server" OnClick="Click" Text=""/>
</form>
</body>
</html>Wrox书上的例子,网页重定向的问题,大家看看这段源码哪点出错了
<script Language="c#" runat="server">
void Page_Load(object source, EventArgs e)
{
if (!(IsPostBack))
{
MyButton.Text = "OK";
MyDropDownList.Items.Add("http://www.microsoft.com");
MyDropDownList.Items.Add("http://www.wrox.com");
MyDropDownList.Items.Add("http://msdn.microsoft.com");
}
}
public void Click (object sender,EventArge e)
{
Response.Redirect(MyDropDownList.SelectedItem.Text);
}
</script>
<html>
<body>
<form id="WebForm1" method="post" runat="server">
<asp:DropDownList id=MyDropDownList runat="server"/>
<asp:button id=MyButton runat="server" OnClick="Click" Text=""/>
</form>
</body>
</html>Wrox书上的例子,网页重定向的问题,大家看看这段源码哪点出错了
解决方案 »
- C#往word里面写数据出现的小错误,高手来指点下
- 搜索关键字问题
- mvc 插入html5拍照功能,访问页面时不提示是否启动摄像头,帮我看看
- 急急急,请教个数据库问题和一个方法的思路。
- javascript 按着键盘不放 怎样连续调用?
- 高分求助,onclientclick 本机测试时成功,上传到远程服务器后不询问'确认要退出吗?‘而是直接退出,请问问题出在哪里
- 寻求网站改版的一些解决问题,顶者有分!!!!!!!!!
- 请各位兄弟姐妹帮帮忙,一条sql语句。
- 系统“角色”与“模块权限”的设计~我该如何设计好?
- 使用form验证是否必须打开cookie,能否结合session实现?
- Web标准的问题
- 求救,WEB应用程序datagrid无法显示数据
{
Response.Redirect(MyDropDownList.SelectedItem.Text);
}
啊,应该是上面的代码。