Question corrospoding ref into parameter and post it

jt_work

New member
Joined
Dec 30, 2008
Messages
2
Programming Experience
Beginner
I have the following code and have a sqldatasource to execute a stored proc and send the ref number and drop down value as a parameter. The drop down posts the value but im not sure how to get the corrospoding ref number into a parameter to pass in my stored procedure?

Anyone able to advise on how best to do this possibly with an example?
HTML:
<asp:GridView ID="Gridview4" runat="server" AutoGenerateColumns="False" pagesize="1"
        EmptyDataText="No Records found!">
        <Columns>
        <asp:TemplateField HeaderText="Ref Number">
            <ItemTemplate><%#Eval("Tel_Num")%></ItemTemplate>
            </asp:TemplateField>
                <asp:TemplateField>
            <ItemTemplate>
            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true">
            <asp:ListItem Value="-1" Selected="True">choose one of the following ...</asp:ListItem>
            <asp:ListItem Value="1">value1</asp:ListItem>
            <asp:ListItem Value="2">value2</asp:ListItem>
            <asp:ListItem Value="3">value3</asp:ListItem>
            <asp:ListItem Value="4">value4</asp:ListItem>
            <asp:ListItem Value="4">value5</asp:ListItem>
            <asp:ListItem Value="4">value6</asp:ListItem>
            <asp:ListItem Value="4">value7</asp:ListItem>
            </asp:DropDownList>
            </ItemTemplate>
            </asp:TemplateField>

                            
        </Columns>
</asp:GridView>
 

Latest posts

Back
Top