<asp:DropDownList ID="RequestorDropDownList" runat="server" Font-Size="8.25pt" Height="20px" ToolTip="Requestor" Width="160px" SelectMethod="GetRequestorEmail" DataTextField="DisplayName" DataValueField="Email"></asp:DropDownList>
public async Task<IEnumerable<GetRequestorInfoModel>> GetRequestorEmail() { try { var requestors = await FTACaseReseting.Controllers.RequestorInfoController.GetAllRequestorInfoes(); return requestors.OrderBy(x => x.DisplayName); } catch (Exception ex) { string errorMsg = string.Format("An error has occured in {0}. \nException:\n{1}", "PopulateRequestorComboBox()", ex.Message); Response.Write("<script>alert(" + HttpUtility.JavaScriptStringEncode(errorMsg, true) + ")</script>"); return Enumerable.Empty<GetRequestorInfoModel>(); } }
use selected index
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)