473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Radiobuttons and textbox with autopost

hi,

i have a radiobuttonlist which i have set the autopostback feature to false, so it would be easier to navigate thru' it, using the keyboard.

below the radiobuttonslist, i have a textbox which then has a method which fires , and i would need the value of the selected radiobutton.

since it does a postback, the value of the selected button goes to the default and i can't seem to pick up that value ..

any suggestions ??

Thank You for your feedback and inputs
--
Thank You,
Sean
Nov 17 '05 #1
1 1150
Hi Sean,

If I understand your problem correctly, you need to store the selected radio
button (I'm using viewstate) when the textbox.changed event fires. Then, as the
page refreshes, you need to set the button to its previous value. Here's some
code that might get you moving:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
If Not IsPostBack Then
RadioButtonList1.SelectedIndex = _
RadioButtonList1.Items.IndexOf _
(viewstate("selval"))
End If
End Sub

Private Sub TextBox1_TextChanged _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles TextBox1.TextChanged
Label1.Text = RadioButtonList1.SelectedValue
viewstate("selval") = _
RadioButtonList1.SelectedValue
End Sub

Does this help?

Ken
MVP [ASP.NET]

"Sean" <nospam@> wrote in message news:u9**************@TK2MSFTNGP10.phx.gbl...
hi,

i have a radiobuttonlist which i have set the autopostback feature to false, so
it would be easier to navigate thru' it, using the keyboard.

below the radiobuttonslist, i have a textbox which then has a method which
fires , and i would need the value of the selected radiobutton.

since it does a postback, the value of the selected button goes to the default
and i can't seem to pick up that value ..

any suggestions ??

Thank You for your feedback and inputs
--
Thank You,
Sean
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Christiaan Nieuwlaat | last post by:
Hi everyone, Could you please help me with this? I need to create a table in which resultdata from a sql server table can be shown and/or edited by using controls, for instance the radiobutton....
1
by: --=|3s|=-- | last post by:
Hi, I'm trying to create a form in VISUAL BASIC .NET wich shows values of records from a customers table. For example a form wich shows the name, surname and sex of a person. For the name &...
4
by: news.microsoft.com | last post by:
Hello, I have two databound radiobuttons which have advanced databinding properties of onpropertychanged enabled so that I can raise the columnchanged event whenever the radiobuttons are...
0
by: PaulS | last post by:
Hello! I put on Form PictureBox and I set big image. Next I put many radiobuttons (80) on PictureBox, but I have problem. I want that 10 radiobuttons have own Checked, next part of 10...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.