Prashant Gunde

Prashant Gunde

  • NA
  • 8
  • 1.6k

control not working after using update panel

Oct 21 2015 8:46 AM
I am using update panel for dropdownlist with providing triggering statement and also set autopostback property is "true" but still the DDL control not proper working on selectedindexedchanged.
 
my code is below-->
 
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlClient" runat="server" Width="99%"
AutoPostBack="True"
onselectedindexchanged="ddlClient_SelectedIndexChanged">
</asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlClient"
EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
 
my .cs file-->
 
 try
{

if (ddlClient.SelectedItem != null)
{

Boolean members = objClsClient.checkmember(ddlClient.SelectedValue);
if (members == true)
{
Image2.ImageUrl = "~/Images/green-flag.jpg";
Image2.ToolTip = "Indimnity Bond Signed";
}
else if (members == false)
{
Image2.ImageUrl = "~/Images/red-flag.jpg";
Image2.ToolTip = "Indimnity Bond Signed";
}

}
else
{

}
 }catch....
 
 
Thanks in advance!!!!!
 

Answers (5)