I tried to do the exact same thing using vs.net (2003) and it works fine.
What is the difference? The code is straight forward and is doing nothing
in the events - just returning:
Here are the 2 vs.net files:
*************** *************** *************** *************** ***********
<%@ Page Language="vb" AutoEventWireup ="false" Codebehind="Web Form1.aspx.vb"
Inherits="WebAp plication5.WebF orm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1 </title>
<meta name="GENERATOR " content="Micros oft Visual Studio.NET 7.0">
<meta name="CODE_LANG UAGE" content="Visual Basic 7.0">
<meta name="vs_defaul tClientScript" content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<P>
<asp:RadioButto n id="ScreenTests " Text="Screening " TextAlign="righ t"
AutoPostBack="t rue" OnCheckedChange d="ScreenTests_ CheckedChanged"
GroupName="Posi tions" runat="server"> </asp:RadioButton >
<asp:RadioButto n id="Skillstests " Text="Skills" TextAlign="righ t"
AutoPostBack="t rue" OnCheckedChange d="Skillstests_ CheckedChanged"
GroupName="Posi tions" runat="server"> </asp:RadioButton ></P>
<P>
<asp:ListBox id="ListBox1" runat="server">
<asp:ListItem Value="1">This is Line 1</asp:ListItem>
<asp:ListItem Value="2">This is Line 2</asp:ListItem>
</asp:ListBox></P>
<P>
<asp:LinkButt on id="LinkButton1 " Text="Link Job"
OnClick="Skills tests_CheckedCh anged" runat="server" /></P>
</form>
</body>
</HTML>
*************** *************** *************** *************** ***********
*************** *************** *************** *************** ************
Public Class WebForm1
Inherits System.Web.UI.P age
Protected WithEvents ScreenTests As
System.Web.UI.W ebControls.Radi oButton
Protected WithEvents ListBox1 As System.Web.UI.W ebControls.List Box
Protected WithEvents LinkButton1 As System.Web.UI.W ebControls.Link Button
Protected WithEvents Skillstests As
System.Web.UI.W ebControls.Radi oButton
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub
InitializeCompo nent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeCompo nent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
Public Sub LinkButton1_Cli ck(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles LinkButton1.Cli ck
End Sub
Public Sub ScreenTests_Che ckedChanged(ByV al sender As System.Object,
ByVal e As System.EventArg s) Handles ScreenTests.Che ckedChanged
End Sub
Public Sub Skillstests_Che ckedChanged(ByV al sender As System.Object,
ByVal e As System.EventArg s) Handles Skillstests.Che ckedChanged
End Sub
End Class
*************** *************** *************** *************** ************
Thanks,
Tom
"tshad" <tf*@dslextreme .com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
I have a page that has been displaying some weird behavior.
I have 2 radio buttons that work fine until I press the link button with
an item selected in my link box (if an item is not selected, there is no
problem).
This makes no sense. I am not doing anything with the item in the
listbox. It just has to be selected.
What happens is that once this starts happening, the radio buttons WILL
NOT stay selected. So the page quits working.
If I don't select either of the items in the listbox, I can press the
Linkbutton all day and the radio buttons will work. But once I select it,
the radio buttons will never work again.
What is wrong here?
Is this a bug in Asp? There is no Database access here, so that is not
the problem.
I can't figure this out nor can anyone I work with.
I have stripped out everything that is not related to the problem.
Anyone have an idea as to what is causing this problem???
*************** *************** *************** *********
<%@ Page Language="VB" trace="false" debug="true" ContentType="te xt/html"
ResponseEncodin g="iso-8859-1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>:: Staffing Workshop ::</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script runat="server">
Sub Page_Load(sende r as Object, e as EventArgs)
End Sub
Sub GetScreenNames_ Checked(s as Object, e as EventArgs)
End Sub
Sub LinkJob_Click(s as Object,e as EventArgs)
End Sub
</script>
</head>
<body id="myBody" runat="server">
<form id="Form1" runat="server">
<input type="hidden" name="__SCROLLP OS" value="" />
<br>
<table border="0" width="650" style="border-collapse:collap se" >
<tr>
<td width="701">
<asp:RadioButto n ID="ScreenTests " Text="Screening "
TextAlign="righ t" AutoPostBack="t rue"
OnCheckedChange d="GetScreenNam es_Checked" GroupName="Posi tions"
runat="server" Checked="true" />
<asp:RadioButto n ID="SkillsTests " Text="Skills"
TextAlign="righ t" AutoPostBack="t rue" OnCheckedChange d="GetScreenNam es_Checked"
GroupName="Posi tions" runat="server" /> </td>
</tr>
<tr>
<td ><asp:ListBox ID="Positions" SelectionMode=" multiple" Rows="8"
Width="600" runat="server">
<asp:ListItem Value="1">This is Line 1</asp:ListItem>
<asp:ListItem Value="2">This is Line 2</asp:ListItem>
</asp:ListBox>
</td>
</tr>
<tr>
<td >
<asp:LinkButt on ID="LinkJob" Text="Link Job"
OnClick="LinkJo b_Click" runat="server" />
</td>
</tr>
</table>
</form>
</body>
</html>
*************** *************** *************** **********
Thanks,
Tom