protected void dd_SelectedIndexChanged(object sender, EventArgs e)
{
RegisterClientScriptBlock("", "ConfirmIt()");
/*Now Access the Hidden Filed Value Since it Contain the value that
User Clicked OK or Cancel */
int result = int.Parse(HiddenField1.Value.ToString());
if (result == 1)
{
// Do somthing
}
}
My Page has-
<ItemTemplate>
<asp:HiddenField ID="HiddenField1" runat="server" Value="" />
<aspropDownList id="dd" runat="server" onselectedindexchanged="dd_SelectedIndexChanged" AutoPostBack="True">
<asp:ListItem Value="Pending">Pending</asp:ListItem>
<asp:ListItem Value="Yes">Yes</asp:ListItem>
<asp:ListItem Value="No">No</asp:ListItem>
</aspropDownList>
</ItemTemplate>
My code goes like this..If user changes a dropdown value from pending to yes/no or vice-versa,a dialog box should appear to confirm the changes but -
The error which i am getting is
The name 'HiddenField1' does not exist in the current context
The name 'RegisterClientScriptBlock' does not exist in the current context
How to resolve that.
{
RegisterClientScriptBlock("", "ConfirmIt()");
/*Now Access the Hidden Filed Value Since it Contain the value that
User Clicked OK or Cancel */
int result = int.Parse(HiddenField1.Value.ToString());
if (result == 1)
{
// Do somthing
}
}
My Page has-
<ItemTemplate>
<asp:HiddenField ID="HiddenField1" runat="server" Value="" />
<aspropDownList id="dd" runat="server" onselectedindexchanged="dd_SelectedIndexChanged" AutoPostBack="True">
<asp:ListItem Value="Pending">Pending</asp:ListItem>
<asp:ListItem Value="Yes">Yes</asp:ListItem>
<asp:ListItem Value="No">No</asp:ListItem>
</aspropDownList>
</ItemTemplate>
My code goes like this..If user changes a dropdown value from pending to yes/no or vice-versa,a dialog box should appear to confirm the changes but -
The error which i am getting is
The name 'HiddenField1' does not exist in the current context
The name 'RegisterClientScriptBlock' does not exist in the current context
How to resolve that.