So I have a link on my aspx page that Im trying to trigger a separate html using lightbox. whenever I click the link the lightbox works fine but the html that is being loaded is giving me the error below. BUT if I use an aspx file instead of an html file it works BUT it shows the page twice! I’ve searched and I dont know if editing the aspnet_isapi.dll will really work. First of all I don’t even know where to find it. Any thoughts?
Thanks!
The HTTP verb POST used to access path
‘/test.html’ is not allowed.
Description: An unhandled exception
occurred during the execution of the
current web request. Please review the
stack trace for more information about
the error and where it originated in
the code.Exception Details:
System.Web.HttpException: The HTTP
verb POST used to access path
‘/PersonEditor_WebApp/test.html’ is
not allowed.Source Error:
An unhandled exception was generated
during the execution of the current
web request. Information regarding the
origin and location of the exception
can be identified using the exception
stack trace below.
**********EDIT FOR CODE***************
<tr>
<td><asp:Button ID="bLogin" runat="server" Text="Login" onclick="bLogin_Click" /></td>
<td><asp:LinkButton ID="lbForgotPassword" runat="server" href="confirmcancel.html" autopostback="true" OnClick="lbForgotPassword_OnClick">Forgot Password</asp:LinkButton></td>
<td><asp:Label ID="lbLoginError" runat="server" ForeColor="Red"
CssClass="validator"></asp:Label></td>
</tr>
******this is the one on the cs file*************
protected void Page_Load(object sender, EventArgs e)
{
Page.MaintainScrollPositionOnPostBack = true;
//register javascripts and setup buttons
ClientScript.RegisterClientScriptBlock(this.GetType(), "Prototype", "<script src='Scripts/prototype.js' language=javascript></script>");
ClientScript.RegisterClientScriptBlock(this.GetType(), "LigthBoxScript", "<script src='Scripts/lightbox.js'></script>");
lbForgotPassword.CssClass = "lbOn";
}
Ok so I think i solved it. But not really.
I was able to make the lightbox load the correct page but it needs to be an aspx page. if i use a normal html page I get the error again…
And I used the same lines of codes btw.
So i guess i just have to make do with an aspx page.
If anybody would know why a regular html page will give the error please feel free to post an answer.
Thanks much!
-G