Checkbox AutoPostBack not working

ImDaFrEaK

Well-known member
Joined
Jan 7, 2006
Messages
416
Location
California
Programming Experience
5-10
I have added two checkboxes to my form and a button called update users. I want to change usre privedges by checking or unchecking the appropriate checkboxes. I recently decided it would be better in my current situation to cause a post back on each checkchange so I set the AutoPostback for each checkbox to true. These are normal checkboxes added to my form inside a table. The autopost back does not fire. Any ideas?
 
Any help comparing with this?
HTML:
<body>
<form id="form1" runat="server">
<div>
<table>
<tr><td><asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" /></td></tr>
</table>
</div>
</form>
</body>
VB.NET:
Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
    Me.Title = CheckBox1.Checked.ToString
End Sub
 
Here is my Checkbox Attribute....

VB.NET:
[SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]CheckBox[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]ID[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="CheckBoxResetRegisteredMember"[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server"[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]Text[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Registered Member"[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#ff0000]AutoPostBack[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="True"[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]/>
[/COLOR][/SIZE]

Here is the event handler....

VB.NET:
[SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Protected[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] CheckBoxResetRegisteredMember_CheckedChanged([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Object[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.EventArgs) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] CheckBoxResetRegisteredMember.CheckedChanged
 
[COLOR=blue]me[/COLOR].title = [COLOR=red]"IM HERE"[/COLOR]
[/SIZE] 
[SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Sub
[/COLOR][/SIZE]

Does not work unless I force a postback with a button or something :(
 
Back
Top