$(document).ready(function () { FillDropDown(); }); function FillDropDown() { var index = 0; $("#filterCountry").empty(); $().SPServices({ operation: "GetList", listName: "Pages", async: false, completefunc: function (xData, Status) { $(xData.responseXML).find("Field[DisplayName='Country'] CHOICE").each(function () { //if (index == 0) { // $(".filterCountry").append("<option value='0'>--Select--</option>"); //} listItem = "<option value=" + $(this).text() + ">" + $(this).text() + "</option>"; $("#filterCountry").append(listItem); index++; }) } })
<div class="country"> <span class="pull-left mar-top-5">Country</span> <asp:DropDownList ID="filterCountry" runat="server" ClientIDMode="Static" CssClass="form-control pull-right country_drop_down"></asp:DropDownList> </div> <div class="go"> <asp:Button runat="server" CssClass="btn btn-primary" ID="btnSubmit" OnClick="btnSubmit_Click" Text="Go" /> </div>
protected void btnSubmit_Click(object sender, EventArgs e) { ViewState["Query"]) = null; // BindReapterMain(Convert.ToString(ViewState["Query"])); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)