Environment: Visual Studio 2013 - VB.net - .Net Framework 4
Hi All,
I´m writting an intranet website that have some web applications.
These applications use customized panels that are in ascx files to show informations and make questions to the users.
These panels are used with modal popupextender.
All panels that only show informations are working well. but the panels that have codebehinde are not.
The code behinde linked to the buttons in panels inside ascx files are never executed.
See a sample:
ASCX File
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Biblioteca.ascx.vb" Inherits="InformacoesCorporativas2013.Biblioteca" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %><script runat="server">
Protected Sub cmdOk_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Session("Confirm_Delection") = "1"
End Sub
Protected Sub cmdCancel_Click(sender As Object, e As System.EventArgs)
Session("Confirm_Delection") = "0"
End Sub
</script><asp:panel id="Panel_Msgbox_Delecao" style="display:none" runat="server"><div class="Div_Painel_MSGBOX"><div id="PopupHeader" class="Div_Painel_MSGBOX_Cabecalho"><% Response.Write(InformacoesCorporativas2013.ClassesGlobais.wNomeSistema)%></div><div class="Div_Painel_MSGBOX_Corpo"><br /><br />
Confirma deleção deste Registro ?
<br /><br /> </div><div class="Div_Painel_MSGBOX_Botoes"><asp:Button ID="cmdOk" runat="server" Text="Sim" OnClick="cmdOk_Click" /><asp:Button ID="cmdCancel" runat="server" Text="Não" OnClick="cmdCancel_Click"/></div></div></asp:panel>Aspx file
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Principal.Master" CodeBehind="Default.aspx.vb" Inherits="InformacoesCorporativas2013._Default" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><%@ Register Tagprefix="gm" Tagname="general_messages" Src="Biblioteca.ascx" %>
...
<cc1:ConfirmButtonExtender ID="CBE1" runat="server" DisplayModalPopupID="mpeConfirmaDelecao" TargetControlID="cmdApagar"></cc1:ConfirmButtonExtender><cc1:modalpopupextender id="mpeConfirmaDelecao" runat="server"
OkControlID="General_messages1$cmdOk"
CancelControlID="General_messages1$cmdCancel"
targetcontrolid="cmdApagar"
popupcontrolid="General_messages1$Panel_Msgbox_Delecao"
popupdraghandlecontrolid="General_messages1$PopupHeader"
backgroundcssclass="Fundo_Ao_Exibir_Painel" ></cc1:modalpopupextender>Aspx Codebehinde
Me.mpeConfirmaDelecao.Show()
If Session("Confirm_Delection") <> "1" Then
Exit Sub
End IfSession("Confirm_Delection") Always returns "Nothing".
Someone could please help me ?