Take back a vaule of RadioButtionList

Posted on 2004-11-05
Last Modified: 2012-05-05
I used RadioButtonList on ASP.NET page

If RadioButtonList.Selecteditem.value = 1 Then
    MyCommand.Parameters("@Type").Value = "W"
     MyCommand.Parameters("@Type").Value = "S"
End If

Then store Value to MSSQL

Now I need to create a page for record editing, how to take back the value on RadioButtionList of ASP.NET Page

If RadioButtonList value = "W"
  <asp:ListItem value="1" Selected>
End If
If RadioButtonList value = "S"
  <asp:ListItem value="2" Selected>
End If

Question by:rhinoceros
    LVL 28

    Accepted Solution

    Hi rhinoceros,

    have you tried with

    RadioButtonList.SelectedValue ="W" ?
    this should select the item in the radiobuttonlist that contains value "W"

    LVL 13

    Author Comment

    Hi mmarinov,

    Can I ask you one more question please?

    The Syntax:
    If RadioButtonList.SelectedValue ="W" then ...

    It's worked on normal .aspx page. (I write it by WebMatrix and run). But I tried to post this file on Visual Studio .Net for webservice project to compile and running. It rejected me that SelectedValue  is not a member of RadioButtonList. Any idea please ?

    Thanks !

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    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…
    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    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…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    759 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

    14 Experts available now in Live!

    Get 1:1 Help Now