觸發我在我的網頁按鈕,你可以在這裏看到:按鈕的Click事件不會在asp.net
<div class="buttonPossion">
<asp:Button ID="btnFinal" runat="server" Text="دانلود مقاله" CssClass="buttonBlue" OnClick="btnFinal_Click"/>
</div>
該按鈕的單擊事件是:
protected void btnFinal_Click(object sender, EventArgs e)
{
int count =
dbcontext.tblJurorArticles.Where(i => i.articleid == articleId && i.jurorUsername == Session["juror"])
.Count();
if (count == 1)
{
Response.Redirect("../AdminPortal/DownloadArticleHandler.ashx?File=" +
obj.Return_filelocation_article(articleId.ToString()));
}
else
{
Response.Redirect("asda");
}
}
但是當我點擊按鈕時,它不起作用。重要的是我的頁面中的所有按鈕都被禁用。
如果需要html代碼,我可以將其包含在我的問題中。
的webconfig
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="DB-Conference-CivilConstruction" connectionString="Data Source=176.9.90.204,9992;Initial Catalog=DB-Conference-CivilConstruction;User ID=DB-Conference-CivilConstruction-user; [email protected];"
providerName="System.Data.SqlClient" />
<!--<add name="DB-Conference-CivilConstruction" connectionString="Data Source=192.168.223.75;Initial Catalog=DB-Conference-CivilConstruction;User ID=DB-Conference-CivilConstruction-user; [email protected];"
providerName="System.Data.SqlClient" />-->
</connectionStrings>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<httpRuntime maxRequestLength="1048576" />
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
</system.web>
</configuration>
問候
_it這個配置並不WORK_請解釋。什麼不行?事件沒有被觸發?沒有返回值,你沒有得到你需要的重定向?調試器可以幫助你很多,使用它。 – Steve 2015-03-03 08:03:43
是的確切事件不triggers – 2015-03-03 08:04:22
我把一個新的按鈕,但它不能再工作 – 2015-03-03 08:04:58