Dropdownlist.selectedIndexchanged

G

Guest

Why doesn't the the SelectedIndexchanged event for my dropdownlist ever get
executed? Why do I get a page not found error when I select a new item?

My dropdownlist is within a form. The items for the dropdownlist are added
at form load by a procedure. Autopostback is set to true, and viewstate is
enabled. I have placed a stop at the first line of code for the
SelectedIndexChanged event and I have determined that the code is not
executed.
 
M

Mark Fitzpatrick

Can you post some sample of the code, specifically the HTML used to render
the dropdownlist and also the form tag? Check to see that your form tag is
properly formed. I've seen sometimes where instead of <form runat="server">
someone will accidentally write <form action="server">, which would result
in the form posting to an incorrect source.
 
G

Guest

Sometimes the ide fails to wire up the event handlers (i have experienced it
many times ..and had to manually wire up the evnt handlers in the
initializecomponent()
do take a look at that methos and chk if ur event handler is wired up..
Cheers ..Gauri
 
G

Guest

This is the code block for the form:

<body MS_POSITIONING="GridLayout">
<FORM id="Form1" method="post" runat="server">
<asp:hyperlink id="HyperLink2" style="Z-INDEX: 101; LEFT: 304px;
POSITION: absolute; TOP: 16px"
Height="24px" Width="360px" Font-Names="Arial" runat="server"
ToolTip="Maybe you chose the wrong form?"
NavigateUrl="WebEntry.aspx">Return to form selection and choose
different form.</asp:hyperlink>
<asp:datagrid id="PetDataGrid" style="Z-INDEX: 105; LEFT: 32px; POSITION:
absolute; TOP: 488px"
ForeColor="Blue" Font-Size="Medium" Height="218px" Width="1024px"
Font-Names="Arial" runat="server"
AutoGenerateColumns="False" CellPadding="10">
<ItemStyle Font-Size="Smaller" Font-Names="Arial"
ForeColor="#0000CC"></ItemStyle>
<HeaderStyle Font-Size="Medium" Font-Names="Arial Unicode MS"
Font-Bold="True" ForeColor="Blue"
BackColor="#FFFF99"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="lastname" HeaderText="Last
Name"></asp:BoundColumn>
<asp:BoundColumn DataField="firstname" HeaderText="First
Name"></asp:BoundColumn>
<asp:BoundColumn DataField="study_name" HeaderText="Study
Name"></asp:BoundColumn>
<asp:BoundColumn DataField="visit_number" HeaderText="Visit
Number"></asp:BoundColumn>
<asp:BoundColumn DataField="visit_date" HeaderText="Visit Date"
DataFormatString="{0:M/d/yyyy}"></asp:BoundColumn>
<asp:BoundColumn DataField="scandate" HeaderText="Scan Date"
DataFormatString="{0:M/d/yyyy}"></asp:BoundColumn>
<asp:BoundColumn DataField="Status"
HeaderText="Status"></asp:BoundColumn>
<asp:BoundColumn DataField="scanner"
HeaderText="Scanner"></asp:BoundColumn>
<asp:BoundColumn DataField="patient_number"
HeaderText="Patient#"></asp:BoundColumn>
<asp:BoundColumn DataField="Agent" HeaderText="Contrast
Agent"></asp:BoundColumn>
<asp:BoundColumn DataField="Task" HeaderText="Task"></asp:BoundColumn>
<asp:BoundColumn DataField="glucose_use" HeaderText="Glucose
Use"></asp:BoundColumn>
<asp:BoundColumn DataField="Blank" HeaderText="Blank"></asp:BoundColumn>
<asp:BoundColumn DataField="diagnosis"
HeaderText="Diagnosis"></asp:BoundColumn>
<asp:BoundColumn DataField="dob" HeaderText="Birth
Date"></asp:BoundColumn>
<asp:BoundColumn DataField="Gender"
HeaderText="Gender"></asp:BoundColumn>
<asp:BoundColumn DataField="Race" HeaderText="Race"></asp:BoundColumn>
<asp:BoundColumn DataField="Ethnicity"
HeaderText="Ethnicity"></asp:BoundColumn>
<asp:BoundColumn DataField="emission1"
HeaderText="emission1"></asp:BoundColumn>
<asp:BoundColumn DataField="emission2"
HeaderText="emission2"></asp:BoundColumn>
<asp:BoundColumn DataField="transmission1" HeaderText="Transmission
1"></asp:BoundColumn>
<asp:BoundColumn DataField="transmission2" HeaderText="Transmission
2"></asp:BoundColumn>
<asp:BoundColumn DataField="Comments"
HeaderText="Comments"></asp:BoundColumn>
<asp:BoundColumn DataField="referal"
HeaderText="Referal"></asp:BoundColumn>
<asp:BoundColumn DataField="REPORTDATE" HeaderText="Report Date"
DataFormatString="{0:M/d/yyyy}"></asp:BoundColumn>
<asp:BoundColumn DataField="Recon_date"
HeaderText="Reconstruction_date"
DataFormatString="{0:M/d/yyyy}"></asp:BoundColumn>
<asp:BoundColumn DataField="image_date" HeaderText="image_date"
DataFormatString="{0:M/d/yyyy}"></asp:BoundColumn>
<asp:BoundColumn DataField="send_date" HeaderText="Send Date"
DataFormatString="{0:M/d/yyyy}"></asp:BoundColumn>
</Columns>
</asp:datagrid><asp:button id="ButtonLogOff" style="Z-INDEX: 104; LEFT:
440px; POSITION: absolute; TOP: 48px"
ForeColor="Blue" Height="24px" Width="104px" runat="server" Text="Log
Off" BorderStyle="None" Font-Bold="True"
BackColor="White"></asp:button>
<TABLE id="Table1" style="Z-INDEX: 103; LEFT: 32px; WIDTH: 1200px;
POSITION: absolute; TOP: 72px; HEIGHT: 376px"
height="376" cellSpacing="2" cellPadding="2" width="1200" border="0">
<TR>
<TD style="WIDTH: 845px; HEIGHT: 18px" colSpan="5"><asp:label
id="StatusLabel" ForeColor="#0000C0" Font-Size="Larger" Height="48px"
Width="920px"
Font-Names="Arial Rounded MT Bold"
runat="server">Label</asp:label></TD>
</TR>
<TR>
<TD style="WIDTH: 211px; HEIGHT: 77px">
<DIV align="left">
<DIV align="left"><asp:label id="Label1" ForeColor="Navy"
Font-Size="Larger" Height="32px" Width="168px" Font-Names="Arial Rounded MT
Bold"
runat="server">Start Date (mm/dd/yyyy)</asp:label>
<DIV align="left"><asp:textbox id="TextBoxStart" Height="32px"
Width="200px" runat="server"></asp:textbox></DIV>
</DIV>
</DIV>
</TD>
<TD style="WIDTH: 287px; HEIGHT: 77px">
<DIV align="left">
<DIV align="left">
<DIV align="left"><asp:label id="InstructionLabel" ForeColor="Navy"
Font-Size="Larger" Height="32px" Width="160px"
Font-Names="Arial Rounded MT Bold" runat="server">End Date
(mm/dd/yyyy)</asp:label><asp:textbox id="TextBoxEnd" Height="32px"
Width="169px" runat="server"></asp:textbox></DIV>
</DIV>
</DIV>
</TD>
<TD style="WIDTH: 327px; HEIGHT: 77px">
<DIV align="center"></DIV>
</TD>
<TD style="WIDTH: 102px; HEIGHT: 77px">
<DIV align="center">
<DIV align="center"> </DIV>
</DIV>
</TD>
<TD style="HEIGHT: 77px">
<DIV align="center"> </DIV>
</TD>
</TR>
<TR>
<TD style="WIDTH: 211px; HEIGHT: 82px">
<DIV align="left">
<DIV align="left"><asp:label id="LabelSelectStudies"
ForeColor="#0000C0" Font-Size="Larger" Height="48px" Width="162px"
Font-Names="Arial Rounded MT Bold" runat="server"> Study</asp:label>
<DIV align="center"><asp:dropdownlist id="DropDownListStudies"
tabIndex="1" Height="40px" Width="267px" runat="server"
AutoPostBack="True"></asp:dropdownlist></DIV>
</DIV>
</DIV>
</TD>
<TD style="WIDTH: 287px; HEIGHT: 82px">
<DIV align="left">
<DIV align="left"><asp:label id="LabelGroup" ForeColor="Navy"
Font-Size="Larger" Height="32px" Width="240px"
Font-Names="Arial Rounded MT Bold" runat="server"
Visible="False">Group</asp:label><asp:dropdownlist id="DropDownListGroup"
Height="32px" Width="256px" runat="server"
Visible="False"></asp:dropdownlist></DIV>
</DIV>
</TD>
<TD style="WIDTH: 327px; HEIGHT: 82px">
<DIV align="left">
<DIV align="left"><asp:label id="Label3" ForeColor="Navy"
Font-Size="Larger" Height="32px" Width="240px" Font-Names="Arial Rounded MT
Bold"
runat="server">Diagnosis</asp:label><asp:dropdownlist
id="DropDownListDiagnosis" Height="16px" Width="333px"
runat="server"></asp:dropdownlist></DIV>
</DIV>
</TD>
<TD style="WIDTH: 102px; HEIGHT: 82px">
<DIV align="left">
<DIV align="left"> </DIV>
</DIV>
</TD>
<td style="WIDTH: 500px; HEIGHT: 82px"></td>
</TR>
<TR>
<TD style="WIDTH: 211px; HEIGHT: 53px"></TD>
<TD style="WIDTH: 287px; HEIGHT: 53px"></TD>
<TD style="WIDTH: 327px; HEIGHT: 53px"></TD>
<TD style="WIDTH: 102px; HEIGHT: 53px">
<DIV align="center"><asp:imagebutton id="ImageButtonFindStudy"
Height="40px" Width="95px" runat="server"
ImageUrl="Find-Button.gif"></asp:imagebutton></DIV>
</TD>
<TD style="WIDTH: 500px">
<DIV align="center"> </DIV>
</TD>
</TR>
</TABLE>
</FORM>
 
G

Guest

Thanks for the input. As it turns out the page had expired. When the page
loads a large dataset is loaded into the datagrid. The data is returned
visually but after the page expires. (Hmmm! Curious?) When I modified the SQL
to load less data I found that the page loaded quicker and subsequent on
change events after the page loaded occurred without fail. It seems I need
to learn more about managing the session parameters.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top