ggeorgiou01
Programmer
Hi all,
I have a default.aspx file which contains a user control called contractsearch.ascx. This control contains a dropdownlist with witch, i would like to do an action on the SelectedIndexChanged event.
But when i select an option in my dropdownlist the contents dissapear from the dropdownlist and the event never seems to get run.
Does anybody have an answers as to why this is happening. I have posted my code below. (note: I have enabled ViewState in both my aspx and my ascx files.
DEFAULT.aspx
______________________________________________________
<%@ Page Language="C#" EnableViewState="true" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
<html xmlns=" >
<head runat="server">
<title>HCC Contract Register</title>
<link rel="stylesheet" href="Main.css" type="text/css">
</head>
<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0
<form id="form1" runat="server">
<div class="pageWrapper">
<div class="contentWrapper">
<div class="columnCenter" id="centerPane" runat="server">
</div>
</div>
</div>
</form>
</body>
</html>
CONTRACTSEARCH.ascx
__________________________________________________________
<%@ Control Language="C#" EnableViewState="true" AutoEventWireup="true" CodeFile="ContractSearch.ascx.cs" Inherits="Controls_ContractSearch" %>
<asp:dropdownlist id="TypeDdl" runat="server" DataValueField="ID" DataTextField="Description" AutoPostBack="True" Width="450px" onselectedindexchanged="TypeDdl_SelectedIndexChanged" Font-Size="0.75em"></asp:dropdownlist>
<asp:dropdownlist id="CategoryDdl" runat="server" DataValueField="ID" DataTextField="Description" AutoPostBack="True" Width="450px" onselectedindexchanged="CategoryDdl_SelectedIndexChanged" Font-Size="0.75em"></asp:dropdownlist>
<asp:dropdownlist id="SubCategoryDdl" runat="server" DataValueField="ID" DataTextField="Description" AutoPostBack="True" Width="450px" Font-Size="0.75em"></asp:dropdownlist>
I have a default.aspx file which contains a user control called contractsearch.ascx. This control contains a dropdownlist with witch, i would like to do an action on the SelectedIndexChanged event.
But when i select an option in my dropdownlist the contents dissapear from the dropdownlist and the event never seems to get run.
Does anybody have an answers as to why this is happening. I have posted my code below. (note: I have enabled ViewState in both my aspx and my ascx files.
DEFAULT.aspx
______________________________________________________
<%@ Page Language="C#" EnableViewState="true" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
<html xmlns=" >
<head runat="server">
<title>HCC Contract Register</title>
<link rel="stylesheet" href="Main.css" type="text/css">
</head>
<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0
<form id="form1" runat="server">
<div class="pageWrapper">
<div class="contentWrapper">
<div class="columnCenter" id="centerPane" runat="server">
</div>
</div>
</div>
</form>
</body>
</html>
CONTRACTSEARCH.ascx
__________________________________________________________
<%@ Control Language="C#" EnableViewState="true" AutoEventWireup="true" CodeFile="ContractSearch.ascx.cs" Inherits="Controls_ContractSearch" %>
<asp:dropdownlist id="TypeDdl" runat="server" DataValueField="ID" DataTextField="Description" AutoPostBack="True" Width="450px" onselectedindexchanged="TypeDdl_SelectedIndexChanged" Font-Size="0.75em"></asp:dropdownlist>
<asp:dropdownlist id="CategoryDdl" runat="server" DataValueField="ID" DataTextField="Description" AutoPostBack="True" Width="450px" onselectedindexchanged="CategoryDdl_SelectedIndexChanged" Font-Size="0.75em"></asp:dropdownlist>
<asp:dropdownlist id="SubCategoryDdl" runat="server" DataValueField="ID" DataTextField="Description" AutoPostBack="True" Width="450px" Font-Size="0.75em"></asp:dropdownlist>