Hi
Please look at the following code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="lixo.aspx.cs" Inherits="lixo" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title></title><style>
.modalBackground {
background-color: Gray;
filter: alpha(opacity=50);
opacity: 0.7;
}
.pnlBackGround {
position: fixed;
top: 10%;
left: 10px;
width: 300px;
height: 125px;
text-align: center;
background-color: White;
border: solid 3px black;
}
</style></head><body><form id="form1" runat="server"><div><asp:Button ID="Button1" runat="server" Text="Button" OnClick="Bola" /><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="Panel1" TargetControlID="Label1" CancelControlID="Button2" BackgroundCssClass="modalBackground" DropShadow="True"></ajaxToolkit:ModalPopupExtender><asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><asp:Panel ID="Panel1" runat="server" CssClass="pnlBackGround" Height="300px" Width="500px" Style="display: none;"><div class="container-fluid"><div class="row"><div class="col-md-12"><div class="table-responsive"><table class="table"><thead><tr><th>Flag</th><th>Country</th><th>Amount</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>Continente</td><td>0 €</td><td>Envio Correio Registado/Transp.</td></tr></tbody></table></div></div></div></div><asp:Button ID="Button2" CssClass="btn btn-warning" runat="server" Text="Close" /></asp:Panel></div></form></body></html>in cs
protected void Bola(object sender, EventArgs e)
{
ModalPopupExtender1.Show();
}My problem
It doesn't work on my wesiteA (localhost) but if I copy this file towebsiteB (localhost) it works.
No errors, nothing. I have the same ajaxcontroltoolkit.dll in Bin folder in both websites
What is the problem?
On my website I have the same problem, I don't know if the problem is with https access
Please look at the link
https://cheirabem.com/lixo.aspx
Click the button and got lot (script) of errors.
In my global.asax I have:
protected void Application_BeginRequest(Object sender, EventArgs e)
{
// Allow https pages in debugging
if (Request.IsLocal)
{
if (Request.Url.Scheme == "http")
{
//int localSslPort = 44362; // Your local IIS port for HTTPS
//var path = "https://" + Request.Url.Host + ":" + localSslPort + Request.Url.PathAndQuery;
//Response.Status = "301 Moved Permanently";
//Response.AddHeader("Location", path);
}
}
else
{
switch (Request.Url.Scheme)
{
case "https":
Response.AddHeader("Strict-Transport-Security", "max-age=31536000");
break;
case "http":
var path = "https://" + Request.Url.Host + Request.Url.PathAndQuery;
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location", path);
break;
}
}
}Thank you