NET 2.0 C# DetailsView RadioButtonList how set  parmete

Posted on 2006-05-12
Last Modified: 2008-02-23
Hi Expert:

Could someone  kindly please show me how to set a RadioButtonList selected value  into the InsertCommand="INSERT INTO      show below

I am the using the "DetailsView" Insert mode something like show below:

   <title>DetailsView Insert</title>
  <form id="form1" runat="server">
    <asp:DetailsView DefaultMode="Insert" AutoGenerateRows="False" DataKeyNames="au_id"
      DataSourceID="SqlDataSource3" HeaderText="Insert Author" ID="DetailsView1" runat="server"
        <asp:BoundField DataField="firstname" HeaderText="au_id" ReadOnly="True" SortExpression="au_id" />

    <asp:TextBox ID="TextBox1" runat="server"  Text='<%# Bind("firstname") %>'></asp:TextBox>
    <asp:RequiredFieldValidator runat="server" ControlToValidate = "TextBox1" ErrorMessage="RequiredFieldValidator">

    <asp:RadioButtonList  id ="RadioButtonList1" RepeartLayout= Flow runat="server"  ???='<%# Bind("type ") %>'></asp:RadioButtonList  >

   <asp:CommandField ShowInsertButton="True" />
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:Pubs %>"
   InsertCommand="INSERT INTO persons (firstname, type ) VALUES (@firstname, @radiobuttonselectionvaluetype)">
radiobuttonselectionvalue = "1"   or "0"              default=0

HELP and thank you
Question by:RSSIAdmin
    1 Comment
    LVL 11

    Accepted Solution

    Here is a great article:

    This will help with your databinding

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now