I have some values that are being passed to a ASP.NET page using C# but I need those values to be set as parameters for an SQL datasource. I am just getting started with C# and ASP.NET so any help will be appreciated.
The data source code I have is as follows:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:PRS_atlantaConnectionString %>"
SelectCommand="SELECT [ExtNum] FROM [EXTINFORMATION] WHERE (([LastName] = @LastName) AND ([FirstName] = @FirstName))">
<SelectParameters>
<asp:Parameter DefaultValue="DYNAMIC_VALUE_HERE" Name="LastName" Type="String" />
<asp:Parameter DefaultValue="DYNAMIC_VALUE_HERE" Name="FirstName" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
Currently I am displaying the values on the page using the following code:
<%= FirstName %>
<%= LastName %>
Any help again will be appreciate it.