473,325 Members | 2,712 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,325 software developers and data experts.

Dropdownlist.selectedIndexchanged


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.
Oct 9 '06 #1
5 2508
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.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Victorious1" <Vi*********@discussions.microsoft.comwrote in message
news:8B**********************************@microsof t.com...
>
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.

Oct 9 '06 #2
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

"Victorious1" wrote:
>
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.
Oct 10 '06 #3
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>

"Mark Fitzpatrick" wrote:
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.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Victorious1" <Vi*********@discussions.microsoft.comwrote in message
news:8B**********************************@microsof t.com...

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.


Oct 10 '06 #4
This is the HTML reduced to the relevant sections:

<form id="Form1" method="post" runat="server">
<TABLE id="Table1" style="Z-INDEX: 103; LEFT: 8px; WIDTH: 1200px; POSITION:
absolute; TOP: 8px; HEIGHT: 376px"
height="376" cellSpacing="2" cellPadding="2" width="1200" border="0">
<TR>
<TD style="WIDTH: 211px; HEIGHT: 82px">
<asp:label id="LabelSelectStudies" runat="server" Font-Names="Arial
Rounded MT Bold" Width="162px"
Height="48px" Font-Size="Larger" ForeColor="#0000C0"Study</asp:label>
<DIV align="center">
asp:dropdownlist id="DropDownListStudies" tabIndex="1" runat="server"
Width="267px" Height="40px"
AutoPostBack="True"></asp:dropdownlist></DIV>
</DIV>
</DIV>
</TD>

</form>

"Mark Fitzpatrick" wrote:
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.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Victorious1" <Vi*********@discussions.microsoft.comwrote in message
news:8B**********************************@microsof t.com...

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.


Oct 10 '06 #5
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.

"Victorious1" wrote:
>
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.
Oct 11 '06 #6

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

Similar topics

1
by: Donal | last post by:
I have 3 related dropdowns. When the 1st is changed, the 2nd is updated, and when the 2nd is changed, the 3rd is updated. When i change the 1st dropdown (sites), the SelectedIndexChanged fires...
4
by: DotNetJunky | last post by:
I have built a control that runs an on-line help system. Depending on the category you selected via dropdownlist, it goes out and gets the child subcategories, and if there are any, adds a new...
2
by: Shiju Poyilil | last post by:
Hi ! I have a requirement wherein i am binding a datalist which contains a label (Caption for the field) and some literal hidden fields and a dropdown list. When I am binding to the datalist.....
0
by: Tand35006 | last post by:
Hi, I hope some one can help with this. I have a basic webform with 2 DropDownLists and a single DataGrid. What I am trying to do is populate the first DDList from a dataset on Form_Load. I then...
1
by: sergeyr3 | last post by:
Hey guys, I am new here, so i hope this works out: I have a datagrid which I populate with data from XML file. In EditItemTemplate I have a dropdownlist. How do I fire myDataGrid_UpdateCommand...
4
by: David | last post by:
Hi all, I am doing this in a web page... I have a dropdownlist that autopostback. This sets me a filter criteria for items to display in a datalist. In the datalist, I have edit...
11
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
2
by: jnoody | last post by:
The problem I am having is with the SelectedIndexChanged event not always firing or the SelectedIndex property not being correct when the event does fire. The code is below, but here are some...
5
by: revbart | last post by:
Yep, that's me. I'll bet I've read a hundred articles somewhere or another, but I just can't get the thing to work. I'm working on a custom solution. One of the major UIs includes a calendar-style...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.