Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何从listview中的dropdownlist中获取所选值?_Javascript_Html_Css_Asp.net - Fatal编程技术网

Javascript 如何从listview中的dropdownlist中获取所选值?

Javascript 如何从listview中的dropdownlist中获取所选值?,javascript,html,css,asp.net,Javascript,Html,Css,Asp.net,我在ListView中有一个DropDownList。。我想在单击按钮时获取数据。这是我的密码 ı尝试了一些功能,但我做不到 这是aspx页面 <asp:ListView ID="ListView1" runat="server" OnItemCommand="ListView2_ItemCommand" OnItemDataBound="ListView1_ItemDataBound">

我在ListView中有一个DropDownList。。我想在单击按钮时获取数据。这是我的密码

ı尝试了一些功能,但我做不到

这是aspx页面

   <asp:ListView ID="ListView1" runat="server"    OnItemCommand="ListView2_ItemCommand"  OnItemDataBound="ListView1_ItemDataBound">
        <ItemTemplate>
            <div class="ortdadiv">
        <div class="urundiv">

            <div class="resimdiv">
                <div class="resimdivic">
                    <img runat="server" id="img1" src='<%# Eval("UrunResim_Path") %>' width="250" height="250" class="resim" />
                </div>
                <div class="resimlbldiv">

                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("UrunADI") %>' CssClass="resimlbl"></asp:Label>


                </div>

            </div>
        </div>

        <div class="ddldiv">
            <asp:DropDownList ID="DropDownList1"  OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"   runat="server" CssClass="ddl" AutoPostBack="False" AppendDataBoundItems="true" DataTextField="sayılartxt"
                DataValueField="sayılar">
                <asp:ListItem Value="0">-- ADET SEÇ --</asp:ListItem>
            </asp:DropDownList>
            <asp:DropDownList ID="DropDownList2" runat="server"  CssClass="ddl" AutoPostBack="False" AppendDataBoundItems="true" >
                <asp:ListItem Value="0">-- MF SEÇ --</asp:ListItem>
            </asp:DropDownList>

            <asp:Button ID="Button1" runat="server" OnCommand="ButtonComand"     CommandName='<%# Eval("UrunADI") %>' Text="EKLE" CssClass="btn"    />


        </div>
    </div>
        </ItemTemplate>`enter code here`
    </asp:ListView>

'width=“250”height=“250”class=“resim”/>
--阿黛特·塞切赫--
--MF SEÇ--
`在这里输入代码`