DataList中嵌套了DropDownList。此时需要实现选择DDL中的值,在DataList外有个Label

DataList中嵌套了DropDownList。此时需要实现选择DDL中的值,在DataList外有个Label吧。把DDL的值输出到Label中,如果DDL选择别的值... DataList中嵌套了DropDownList。此时需要实现选择DDL中的值,在DataList外有个Label吧。把DDL的值输出到Label中,如果DDL选择别的值,那么就清除之前的输出,输出新选择的值。当然,DataList中肯定是有多行DropDownList的,一行也可能会有几个DropDownList。。怎么实现?http://maq.tw/order 这个页面。急!!! 展开
 我来答
huangpeng0419
2011-03-25 · TA获得超过357个赞
知道小有建树答主
回答量:569
采纳率:100%
帮助的人:297万
展开全部
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DataListExample.aspx.cs"
Inherits="DataListExample" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>DataList</title>

<script src="Scripts/jquery-1.5.1.js" type="text/javascript"></script>

<script type="text/javascript">
$(function() {
$("#dList select").change(function() {
//$("#lfont").html(this.value); // value
$("#lfont").html($("option:selected", this).text()); // text
});
});
</script>

</head>
<body>
<form id="form1" runat="server">
<div>
label:
<asp:Label ID="lfont" runat="server"></asp:Label>
<asp:DataList ID="dList" runat="server">
<ItemTemplate>
<asp:DropDownList ID="d1" runat="server">
<asp:ListItem Value="hi">hi</asp:ListItem>
<asp:ListItem Value="hello">hello</asp:ListItem>
<asp:ListItem Value="how are you doing?">how are you doing?</asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="d2" runat="server">
<asp:ListItem Value="hi morning!">hi morning!</asp:ListItem>
<asp:ListItem Value="hello morning!">hello morning!</asp:ListItem>
<asp:ListItem Value="how are you doing?">how are you doing?</asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
</asp:DataList>
</div>
</form>
</body>
</html>

后台代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class DataListExample : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
dList.DataSource = "abcdefg";
dList.DataBind();
}
}

参考资料: http://code.jquery.com/jquery-1.5.1.min.js

已赞过 已踩过<
你对这个回答的评价是?
评论 收起
SOcddgRR82
2011-03-23
知道答主
回答量:7
采纳率:0%
帮助的人:0
展开全部
By : Laurentiu Sanda
Submitted 2011-03-17 09:06:52 The guideline of real property is to get your money's worth. When you find yourself looking into finding a place, you'll want to be sure that the guideline immediately applies. One solution to make certain that you are becoming extra to your cash is by finding the proper inspector. This can can help you discover a property that's worth the up keep.

The activity of an inspector is to seek out all the things that is perhaps a larger downside in the house before you move in. This will start through checking the electricity, water supply, plumbing,puma shoes on sale, furnace and warmth supplies,chanel handbag, and the final build of the home. They'll take a half of their day with a function to ensure that all the things is built up to customary and that it will not cause problems before you progress in.

If there is something that the inspector says is flawed with your home, you ought to have the ability to ask for maintenance or money back for the home. There are a number of who will keep thousands of dollars via having an inspector have a glance at what is in the dwelling and how it must be changed. Due to this, you'll need to ensure that the correct inspector is coming to your home.

Most likely,Ralph lauren polo shirts, your real estate agent could have a particular inspector that they prefer to work with. Nonetheless, you could find one by yourself and have them examine the house as agreement work. You need to ensure that they will do a thorough task and that they have your finest interests in mind. This can assist you to to stroll into your own home with none surprises and with doable replacements before you move in.

Working with an inspector is an important half to purchasing a home. It should assist to find out and outline the standard of the home and will help you to get the so much effective deal within the end. Earlier than you signal the final papers, make it possible for the inspector you will have worked with has looked by way of everything. This may allow you to to start making your personal home into a home.
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
匿名用户
2011-04-06
展开全部
呵呵,可百度Hi详细分析你听
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式