0
我想在commandArgument按鈕中傳遞選定的下拉文本(ddlTime)。在相同的aspx頁面上的commandArgument中傳遞選定的下拉文本?
注意:Dropdown的Autopostback = false。
代碼 - .aspx的 -
<asp:DropDownList ID="ddlTime" runat="server" AutoPostBack="false" Width="70">
</asp:DropDownList>
<telerik:RadButton ID="btnViewSun" runat="server" Text="View" CommandArgument="-pass selected value here-"
OnClientClicked="OnClientClicked_ViewAssignedCust" ButtonType="LinkButton" BorderStyle="None" />
我HV寫了一個JS功能( 「OnClientClicked_ViewAssignedCust」)來捕捉參數。 請給我一些提示。
我們可以在javascript函數中檢索命令參數。我已經用代碼測試過了。我只想在命令參數中傳遞選定的下拉文本。 – Abhi
你可以直接在你的JS函數中獲得下拉列表中的選定文本。 $(「#ddlTimeClientID option:selected」)。text(); –