FineUI 开源版(原ExtAsp.Net)
Last updated:2017-03SURFSKY
http://pan.baidu.com/share/home?uk=170857326#category/type=0
---------------------------------------------------配置&预设
http://fineui.com/demo/#/demo/config/modify_webconfig.htm
---------------------------------------------------install-package fineui
修改web.config
页面上放置
---------------------------------------------------客户端脚本---------------------------------------------------标准的aspnet服务器端生成客户端脚本
Page.ClientScript.RegisterStartupScript(this.GetType(), "alert_hello", "alert('你好 Asp.Net!');", true);
PageContext.RegisterStartupScript(wnd.GetShowReference());
PageContext.RegisterStartupScript("closeActiveTab();");
FineUI客户端脚本
F.alert("定义在页面中的客户端事件!");
客户端错误捕捉//参考:http://stackoverflow.com/questions/951791/javascript-global-error-handling/10556743#10556743
window.onerror =function (msg, url, line, col, error) {var errors =[];
errors.push('消息:' +msg);
errors.push('网址:' +url);
errors.push('行:' +line);
errors.push('列:' +col);
F.alert(errors.join('
'), 'JavaScript错误!');return true; //返回 true 阻止浏览器弹出错误提示框(比如在IE浏览器中)
};
网页对话框
Alert
Alert.Show("你好 FineUI!", MessageBoxIcon.Warning);
Alert.ShowInTop("你好 FineUI!", MessageBoxIcon.Information);
Confirm
PageContext.RegisterStartupScript(
Confirm.GetShowReference("操作成功!点击确定按钮开始下载文件,点取消按钮弹出对话框",
String.Empty,
MessageBoxIcon.Question,
PageManager1.GetCustomEventReference(false, "Confirm_OK"), //第一个参数 false 用来指定当前不是AJAX请求
PageManager1.GetCustomEventReference("Confirm_Cancel"))
);
组件/窗体
Window wnd= FindControl(wndID) asWindow;
btnClose.OnClientClick=ActiveWindow.GetHideReference();
定制客户端事件(CustomEvent)
F.customEvent('TextBox1_ENTER');
}
}
protected void PageManager1_CustomEvent(objectsender, CustomEventArgs e)
{if (e.EventArgument == "TextBox1_ENTER")
{
TextBox2.Text=TextBox1.Text;
TextBox2.Focus(true);
}
}
客户端事件监听(Listener)
改变另外一个控件
var textbox2ClientID = '';
function onTextBoxChange() {
F(textbox2ClientID).setValue(this.getValue());
}
---------------------------------------------------表单控件
http://fineui.com/demo/
大部分表单控件都有Label属性
Label="这是标签"LabelWidth="150px"LabelAlign="Left"
---------------------------------------------------TimerLabel
Button
图标
客户端事件服务器端点击事件protected void btnHello_Click(objectsender, EventArgs e)
{
Alert.Show("你好 FineUI!", MessageBoxIcon.Warning);
Alert.ShowInTop("你好 FineUI!", MessageBoxIcon.Information);
}
客户端脚本
btnClientClick2.OnClientClick= Alert.GetShowInTopReference("这是在服务器端生成的客户端事件");
菜单按钮
自定义按钮
background-image: url(../res/images/login.png) !important;
width: 320px;
height: 50px;
border-width: 0;
background-color: transparent;
}
.bgbtn .x-frame-ml, .bgbtn .x-frame-mc, .bgbtn .x-frame-mr,
.bgbtn .x-frame-tl, .bgbtn .x-frame-tc, .bgbtn .x-frame-tr,
.bgbtn .x-frame-bl, .bgbtn .x-frame-bc, .bgbtn .x-frame-br {
background-image: none;
background-color: transparent;
}LinkButtonHyperLinkImage
Calendar
Calendar1.MinDate=DateTime.Now;
Calendar1.MaxDate= DateTime.Now.AddDays(20);
Calendar1.SelectedDate= DateTime.Now.AddDays(10);protected void Calendar1_DateSelect(objectsender, EventArgs e)
{
labResult1.Text= String.Format("选择的日期:{0}", Calendar1.SelectedDate.Value.ToString(Calendar1.DateFormatString));
}
TextBox
文本位置
.text-align-right input {text-align: right;}CssClass="text-align-center"TextAreaHtmlEditorTriggerBox(带小图标的输入框)TriggerIconUrl="~/res/icon/application_edit.png"Trigger1IconUrl="~/res/icon/bullet_cros