Apr 26, 2017, 1:05 AM
Fabricio,
But one more question, why my button no response after I mark out the AntiXsrfTokenKey viewstate related code?
The view code is
BTW,
Your advice is to mark out the viewstate code, right? But this is the code visual studio template generate for us. I think everyone will encounter this problem in new project. Maybe it should be log as bug will be better.
But one more question, why my button no response after I mark out the AntiXsrfTokenKey viewstate related code?
The view code is
<%@ Page Title="About" Language="C#" MasterPageFile="Site.Master" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="TestWebForm.About" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<ext:Panel runat="server">
<Items>
<ext:FormPanel runat="server">
<Items>
<ext:Panel runat="server">
<Items>
<ext:GridPanel ID="gridOrg" runat="server" Title="医疗机构" ColumnLines="true" Height="200">
<TopBar>
<ext:Toolbar ID="GridOrgToolbar" runat="server">
<Items>
<ext:Button ID="BtnAdd" Text="新增" runat="server">
<DirectEvents>
<Click OnEvent="OnOrgCreate" />
</DirectEvents>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
</ext:GridPanel>
</Items>
</ext:Panel>
</Items>
</ext:FormPanel>
</Items>
</ext:Panel>
</asp:Content>
code behind is:using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;
namespace TestWebForm {
public partial class About : Page {
protected void Page_Load(object sender, EventArgs e) {
}
protected void OnOrgCreate(object sender, DirectEventArgs e) {
X.Msg.Alert("System Msg", "hello");
}
}
}
It just return "{}" in resopnse. No Message DialogBTW,
Your advice is to mark out the viewstate code, right? But this is the code visual studio template generate for us. I think everyone will encounter this problem in new project. Maybe it should be log as bug will be better.
Last edited by u8621011; Apr 26, 2017 at 1:08 AM.