using dropdownlist control in update panel control but no selectedindexchange event is firing
-
hi iam using asp.net with c# iam using dropdownlist control in update panel control but no selectedindexchange event is firing can you make a change in my code which helps me
<asp:UpdatePanel ID="pannelupdate" runat="server" ><ContentTemplate><asp:DropDownList ID="ddlconnectivity" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlconnectivity_SelectedIndexChanged"><asp:ListItem Value="DSL">DSL</asp:ListItem><asp:ListItem Value="Connect">Connect</asp:ListItem><asp:ListItem Value="Not Available">Not Available</asp:ListItem><asp:ListItem Value="Others">Others</asp:ListItem></asp:DropDownList></ContentTemplate><Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlconnectivity" EventName="SelectedIndexChanged" />
</Triggers></asp:UpdatePanel>protected void ddlconnectivity_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlconnectivity.SelectedValue == "Dsl" || ddlconnectivity.SelectedValue == "Connect" || ddlconnectivity.SelectedValue == "Others")
{txtconnectaccount.Visible=true; } else { txtconnectaccount.Visible = false; } }
when iam selecting any item it is not performing any action and giving message use EnableEventValidation=true in page directive , i have done like this also but even though it is not performing any action. can you help correct the code which helps me
-
hi iam using asp.net with c# iam using dropdownlist control in update panel control but no selectedindexchange event is firing can you make a change in my code which helps me
<asp:UpdatePanel ID="pannelupdate" runat="server" ><ContentTemplate><asp:DropDownList ID="ddlconnectivity" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlconnectivity_SelectedIndexChanged"><asp:ListItem Value="DSL">DSL</asp:ListItem><asp:ListItem Value="Connect">Connect</asp:ListItem><asp:ListItem Value="Not Available">Not Available</asp:ListItem><asp:ListItem Value="Others">Others</asp:ListItem></asp:DropDownList></ContentTemplate><Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlconnectivity" EventName="SelectedIndexChanged" />
</Triggers></asp:UpdatePanel>protected void ddlconnectivity_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlconnectivity.SelectedValue == "Dsl" || ddlconnectivity.SelectedValue == "Connect" || ddlconnectivity.SelectedValue == "Others")
{txtconnectaccount.Visible=true; } else { txtconnectaccount.Visible = false; } }
when iam selecting any item it is not performing any action and giving message use EnableEventValidation=true in page directive , i have done like this also but even though it is not performing any action. can you help correct the code which helps me
-
hi iam using asp.net with c# iam using dropdownlist control in update panel control but no selectedindexchange event is firing can you make a change in my code which helps me
<asp:UpdatePanel ID="pannelupdate" runat="server" ><ContentTemplate><asp:DropDownList ID="ddlconnectivity" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlconnectivity_SelectedIndexChanged"><asp:ListItem Value="DSL">DSL</asp:ListItem><asp:ListItem Value="Connect">Connect</asp:ListItem><asp:ListItem Value="Not Available">Not Available</asp:ListItem><asp:ListItem Value="Others">Others</asp:ListItem></asp:DropDownList></ContentTemplate><Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlconnectivity" EventName="SelectedIndexChanged" />
</Triggers></asp:UpdatePanel>protected void ddlconnectivity_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlconnectivity.SelectedValue == "Dsl" || ddlconnectivity.SelectedValue == "Connect" || ddlconnectivity.SelectedValue == "Others")
{txtconnectaccount.Visible=true; } else { txtconnectaccount.Visible = false; } }
when iam selecting any item it is not performing any action and giving message use EnableEventValidation=true in page directive , i have done like this also but even though it is not performing any action. can you help correct the code which helps me
-
http://www.eggheadcafe.com/community/aspnet/7/10019953/dropdownlist-in-update-pa.aspx[^] Try it...
Jinal Desai - LIVE Experience is mother of sage....
hi it is giving error when iam selecting items from drop down list no action is performing error ====== Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. code ====
<asp:UpdatePanel ID="pannelupdate" runat="server" UpdateMode="Conditional" ><ContentTemplate><asp:DropDownList ID="ddlconnectivity" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlconnectivity_SelectedIndexChanged"><asp:ListItem Value="DSL">DSL</asp:ListItem><asp:ListItem Value="Connect">Connect</asp:ListItem><asp:ListItem Value="Not Available">Not Available</asp:ListItem><asp:ListItem Value="Others">Others</asp:ListItem></asp:DropDownList></ContentTemplate><Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlconnectivity" EventName="SelectedIndexChanged" />
</Triggers></asp:UpdatePanel>protected void ddlconnectivity_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlconnectivity.SelectedValue == "Dsl" || ddlconnectivity.SelectedValue == "Connect" || ddlconnectivity.SelectedValue == "Others")
{txtconnectaccount.Visible=true; } else { txtconnectaccount.Visible = false; } }
action is not performing can you correct my code where iam going wrong.
-
hi iam using asp.net with c# iam using dropdownlist control in update panel control but no selectedindexchange event is firing can you make a change in my code which helps me
<asp:UpdatePanel ID="pannelupdate" runat="server" ><ContentTemplate><asp:DropDownList ID="ddlconnectivity" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlconnectivity_SelectedIndexChanged"><asp:ListItem Value="DSL">DSL</asp:ListItem><asp:ListItem Value="Connect">Connect</asp:ListItem><asp:ListItem Value="Not Available">Not Available</asp:ListItem><asp:ListItem Value="Others">Others</asp:ListItem></asp:DropDownList></ContentTemplate><Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlconnectivity" EventName="SelectedIndexChanged" />
</Triggers></asp:UpdatePanel>protected void ddlconnectivity_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlconnectivity.SelectedValue == "Dsl" || ddlconnectivity.SelectedValue == "Connect" || ddlconnectivity.SelectedValue == "Others")
{txtconnectaccount.Visible=true; } else { txtconnectaccount.Visible = false; } }
when iam selecting any item it is not performing any action and giving message use EnableEventValidation=true in page directive , i have done like this also but even though it is not performing any action. can you help correct the code which helps me
try this .... <asp:AsyncPostBackTrigger ControlID ="YourDropDownName" EventName ="YuorEventName" />