Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Dropdownlist

$
0
0

I have a dropdownlist with users names and a button that supposed to change the values on the page when clicked on.

My button code behind c#

Response.Redirect("~/MembersArea/01-Admin/02-EMS-Staff/15-StaffSystemInfo.aspx?p=" + ddlMembers.SelectedValue);

Dropdownlist and button

<asp:Button ID="btnGetP" runat="server" Text="Get Permissions" 
                             CssClass="emsafrica-button" Width="170" onclick="btnGetP_Click" /></div><div class="emsafrica-layout-cell layout-item-2" style="width: 50%" ><asp:DropDownList ID="ddlMembers" runat="server" 
                            DataSourceID="SqlDataSource2" DataTextField="Name" 
                            DataValueField="StaffID"></asp:DropDownList><asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:TheOneConnectionString %>" 
                                SelectCommand="SELECT FirstName + ' ' + Surname AS Name, [StaffID] FROM [Staff] WHERE ESSID = @ESSID"><SelectParameters><asp:ControlParameter ControlID="ESSStation" Name="ESSID" 
                                                    PropertyName="Text" /></SelectParameters></asp:SqlDataSource>



 

 

 


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>