hey all,
i have a webform with a radiobuttonlist1 on it with 2 items in it and is set
to autopostback. i have a button on the form also that when clicked, sets the
radiobuttonlist1.selectedvalue=-1.
So when i click on the radiobutton item that was selected before it was set
to -1 the postback does not occur, however if i select the other radiobutton
item it does do a postback. is this how it's supposed to work?
thanks,
rodchar 8 1028
Cant reproduce it, see code below. It allways works ok for me. R u using
2002,2003 or 2005 ?
Private Sub RadioButtonList1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RadioButtonList1.SelectedIndexChanged
Label1.Text = Me.RadioButtonList1.SelectedItem.ToString
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Me.RadioButtonList1.SelectedIndex = -1
End Sub
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com... hey all,
i have a webform with a radiobuttonlist1 on it with 2 items in it and is set to autopostback. i have a button on the form also that when clicked, sets the radiobuttonlist1.selectedvalue=-1.
So when i click on the radiobutton item that was selected before it was set to -1 the postback does not occur, however if i select the other radiobutton item it does do a postback. is this how it's supposed to work?
thanks, rodchar
What is the AutoPostBack property of each radio button set to?
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Big things are made up of
lots of little things.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com... hey all,
i have a webform with a radiobuttonlist1 on it with 2 items in it and is set to autopostback. i have a button on the form also that when clicked, sets the radiobuttonlist1.selectedvalue=-1.
So when i click on the radiobutton item that was selected before it was set to -1 the postback does not occur, however if i select the other radiobutton item it does do a postback. is this how it's supposed to work?
thanks, rodchar
my autopostback for the radiobuttonlist1 is set to true. ok, here's more
info: it does do the page_load event but it does not do the
selectedindexchanged event for one radiobutton item but it does for the other.
"Kevin Spencer" wrote: What is the AutoPostBack property of each radio button set to?
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Big things are made up of lots of little things.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message news:4F**********************************@microsof t.com... hey all,
i have a webform with a radiobuttonlist1 on it with 2 items in it and is set to autopostback. i have a button on the form also that when clicked, sets the radiobuttonlist1.selectedvalue=-1.
So when i click on the radiobutton item that was selected before it was set to -1 the postback does not occur, however if i select the other radiobutton item it does do a postback. is this how it's supposed to work?
thanks, rodchar
2003
"Mr Newbie" wrote: Cant reproduce it, see code below. It allways works ok for me. R u using 2002,2003 or 2005 ?
Private Sub RadioButtonList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButtonList1.SelectedIndexChanged Label1.Text = Me.RadioButtonList1.SelectedItem.ToString End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.RadioButtonList1.SelectedIndex = -1 End Sub
"rodchar" <ro*****@discussions.microsoft.com> wrote in message news:4F**********************************@microsof t.com... hey all,
i have a webform with a radiobuttonlist1 on it with 2 items in it and is set to autopostback. i have a button on the form also that when clicked, sets the radiobuttonlist1.selectedvalue=-1.
So when i click on the radiobutton item that was selected before it was set to -1 the postback does not occur, however if i select the other radiobutton item it does do a postback. is this how it's supposed to work?
thanks, rodchar
Do both radio buttons have the same name? If they do not, they are not in
the same group.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Big things are made up of
lots of little things.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:66**********************************@microsof t.com... my autopostback for the radiobuttonlist1 is set to true. ok, here's more info: it does do the page_load event but it does not do the selectedindexchanged event for one radiobutton item but it does for the other.
"Kevin Spencer" wrote:
What is the AutoPostBack property of each radio button set to?
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Big things are made up of lots of little things.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message news:4F**********************************@microsof t.com... > hey all, > > i have a webform with a radiobuttonlist1 on it with 2 items in it and > is > set > to autopostback. i have a button on the form also that when clicked, > sets > the > radiobuttonlist1.selectedvalue=-1. > > So when i click on the radiobutton item that was selected before it was > set > to -1 the postback does not occur, however if i select the other > radiobutton > item it does do a postback. is this how it's supposed to work? > > thanks, > rodchar
i'm using the radiobuttonlist control. i'm adding to the item collections
property list manually.
"Kevin Spencer" wrote: Do both radio buttons have the same name? If they do not, they are not in the same group.
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Big things are made up of lots of little things.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message news:66**********************************@microsof t.com... my autopostback for the radiobuttonlist1 is set to true. ok, here's more info: it does do the page_load event but it does not do the selectedindexchanged event for one radiobutton item but it does for the other.
"Kevin Spencer" wrote:
What is the AutoPostBack property of each radio button set to?
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Big things are made up of lots of little things.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message news:4F**********************************@microsof t.com... > hey all, > > i have a webform with a radiobuttonlist1 on it with 2 items in it and > is > set > to autopostback. i have a button on the form also that when clicked, > sets > the > radiobuttonlist1.selectedvalue=-1. > > So when i click on the radiobutton item that was selected before it was > set > to -1 the postback does not occur, however if i select the other > radiobutton > item it does do a postback. is this how it's supposed to work? > > thanks, > rodchar
hey all,
here's my exact walkthrough:
1. i create a new web application in vs.net 2003
2. i drag a radiobuttonlist control onto the form
3. i goto to the properties window for the radiobuttonlist and click on
(Collection) for the Items property.
4. i add 2 items and make the first item selected by default.
5. i changed the AutoPostBack to True for the radiobuttonlist
6. i add a button and in the code behind for the button i add
radiobuttonlist1.selectedindex=-1
7. i create a stub for radiobuttonlist1_SelectedIndexChanged and add a break
point to End Sub.
8. i also put a break on the end sub for Page_Load.
9. i hit the start button.
10. i press the button on the web form and it clears the selection for
radiobuttonlist.
11. *** i select the same radiobutton item that was selected before i
cleared the list with the button and the page_load event runs but the
radiobuttonlist1_SelectedIndexChanged does not run.
11a. if i clicked any other radiobutton item than the one that was selected
the radiobuttonlist1_SelectedIndexChanged does run. Any ideas?
rodchar.
"Kevin Spencer" wrote: Do both radio buttons have the same name? If they do not, they are not in the same group.
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Big things are made up of lots of little things.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message news:66**********************************@microsof t.com... my autopostback for the radiobuttonlist1 is set to true. ok, here's more info: it does do the page_load event but it does not do the selectedindexchanged event for one radiobutton item but it does for the other.
"Kevin Spencer" wrote:
What is the AutoPostBack property of each radio button set to?
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Big things are made up of lots of little things.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message news:4F**********************************@microsof t.com... > hey all, > > i have a webform with a radiobuttonlist1 on it with 2 items in it and > is > set > to autopostback. i have a button on the form also that when clicked, > sets > the > radiobuttonlist1.selectedvalue=-1. > > So when i click on the radiobutton item that was selected before it was > set > to -1 the postback does not occur, however if i select the other > radiobutton > item it does do a postback. is this how it's supposed to work? > > thanks, > rodchar
i moved my last reply into a new thread, please forgive my redundancy.
"rodchar" wrote: hey all, here's my exact walkthrough:
1. i create a new web application in vs.net 2003 2. i drag a radiobuttonlist control onto the form 3. i goto to the properties window for the radiobuttonlist and click on (Collection) for the Items property. 4. i add 2 items and make the first item selected by default. 5. i changed the AutoPostBack to True for the radiobuttonlist 6. i add a button and in the code behind for the button i add radiobuttonlist1.selectedindex=-1 7. i create a stub for radiobuttonlist1_SelectedIndexChanged and add a break point to End Sub. 8. i also put a break on the end sub for Page_Load. 9. i hit the start button. 10. i press the button on the web form and it clears the selection for radiobuttonlist. 11. *** i select the same radiobutton item that was selected before i cleared the list with the button and the page_load event runs but the radiobuttonlist1_SelectedIndexChanged does not run. 11a. if i clicked any other radiobutton item than the one that was selected the radiobuttonlist1_SelectedIndexChanged does run. Any ideas?
rodchar.
"Kevin Spencer" wrote:
Do both radio buttons have the same name? If they do not, they are not in the same group.
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Big things are made up of lots of little things.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message news:66**********************************@microsof t.com... my autopostback for the radiobuttonlist1 is set to true. ok, here's more info: it does do the page_load event but it does not do the selectedindexchanged event for one radiobutton item but it does for the other.
"Kevin Spencer" wrote:
> What is the AutoPostBack property of each radio button set to? > > -- > HTH, > > Kevin Spencer > Microsoft MVP > ..Net Developer > Big things are made up of > lots of little things. > > "rodchar" <ro*****@discussions.microsoft.com> wrote in message > news:4F**********************************@microsof t.com... > > hey all, > > > > i have a webform with a radiobuttonlist1 on it with 2 items in it and > > is > > set > > to autopostback. i have a button on the form also that when clicked, > > sets > > the > > radiobuttonlist1.selectedvalue=-1. > > > > So when i click on the radiobutton item that was selected before it was > > set > > to -1 the postback does not occur, however if i select the other > > radiobutton > > item it does do a postback. is this how it's supposed to work? > > > > thanks, > > rodchar > > > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Randell D. |
last post by:
Folks,
I use PHP to write my form data to MySQL.
I have a database with about ten tables. I'm trying to fill one table with
some dummy data (its a contact manager table holding names of...
|
by: Jez |
last post by:
Does anyone have any experience of creating dynamic RSS feeds from a
database using PHP?
There's loads of information about RSS, but not much on RSS/PHP.
I'm sure it can't be too difficult,...
|
by: jsaul |
last post by:
Hi there,
wouldn't it be useful to have a 'while' conditional in addition to
'if' in list comprehensions?
foo =
for i in bar:
if len(i) == 0:
break
foo.append(i)
|
by: CJM |
last post by:
I am building several (common) db-driven intranet sites (so I cant
post URL), using a 3-frame layout; header, menu & main pages. The
styling and some of the positioning is done via CSS.
Up until...
|
by: Dart |
last post by:
This code is okay:
class CSingle
{
public:
static CSingle membs;
int MEM_NUM;
CSingle(int n)
{
}
|
by: Salad |
last post by:
Hi: I have the following line:
DoCmd.SendObject acSendReport, "TestReport", _
"SnapshotFormat (*.snp)", _
"joeblow@nowhere.com", , , "Report Test", _
"Does it open correctly?", True
I have...
|
by: Joe |
last post by:
Hey,
Can anyone out there see why when this code renders there's a 1px space
between the headertemplate and the itemtemplate.
<asp:datalist id="asplistDL" BorderStyle="None"...
|
by: JohnR |
last post by:
I have narrowed a problem down to a simple example. A form with two
buttons. One EXIT and one FBD. The exit button does an "END" to end the
application. The FBD button does a...
|
by: Julian |
last post by:
'evening.
I'm not new to C and have been programming in it since I was 8 but
here's a strange problem I've never seen before.
When I compile a program from our C course with a windows compiler...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |