資源簡介
C# WEB,基于Bootstrap的簡潔UI組件。
1、瀏覽器、區域簡潔滾動條;
2、多種彈出信息框
3、多場景左右鍵彈出菜單
VS2017編譯,如有錯誤或者NuGet有問題或需其他版本VS編譯,
只需建立新的WEB應用,將default.aspx、default.cs內容復制到你的文件內容里面。
C# WEB編寫方式比較自由,用此類方式寫代碼屬于個人習慣,
default.aspx中只定義js調用css樣式及一個空表格,內容添加由default.cs完成
比如:
protected void Page_Load(object sender, EventArgs e)
{
//定義表格
Table Table_Frame;
Table_Frame = new Table();
Table_Frame.BackColor = System.Drawing.Color.White;
Table_Frame.HorizontalAlign = HorizontalAlign.Center;
Table_Frame.Width = 1000;
Table_Frame.CellPadding = 0;
Table_Frame.CellSpacing = 0;
TableRow Table_FrameRow;
TableCell Table_FrameCell;
//自定義滾動條、彈出信息框
Table_FrameRow = new TableRow();
Table_FrameRow.Width = Unit.Percentage(100);
Table_FrameCell = new TableCell();
Table_FrameCell.ColumnSpan = 10;
Table_FrameCell.Height = 200; //高度
Table_FrameCell.Text = @"
<div id='os1' class='optiscroll column mid-50'>
自定義滾動條:<br>
1. 瀏覽器自定義滾動條;
2. 在本區域內自定義滾動條;
3. 點擊下面的項目,顯示提示信息。
<ul>
<li><a href='#' class='trigger-info'>Info</a></li>
<li><a href='#' class='trigger-success'>Success</a></li>
<li><a href='#' class='trigger-warning'>Warning</a></li>
<li><a href='#' class='trigger-error'>Error</a></li>
<li><a href='#' class='trigger-custom1'>Custom I</a></li>
<li><a href='#' class='trigger-custom2'>Custom II</a></li>
</ul>
</div>
<script type='text/javascript'>
var os1 = new Optiscroll(document.getElementById('os1'), { maxTrackSize: 20, preventParentScroll: true });
</script>
";
Table_FrameRow.Cells.Add(Table_FrameCell);
Table_Frame.Rows.Add(Table_FrameRow);
.........................
.........................
.........................
.........................
//添加到頁面
System.Web.UI.HtmlControls.HtmlTableRow HtmlTableRow = new System.Web.UI.HtmlControls.HtmlTableRow();
System.Web.UI.HtmlControls.HtmlTableCell HtmlCell = new System.Web.UI.HtmlControls.HtmlTableCell();
HtmlCell.Controls.Add(Table_Frame);
HtmlTableRow.Controls.Add(HtmlCell);
table_fence.Rows.Add(HtmlTableRow);
}
如需執行服務端,cs文件定義Button btn_log = new Button();隱藏不顯示,js用onclick指向btn_log的id的click,
cs文件里面定義protected void btnLog_click(object sender, EventArgs e){。。。執行內容}
等等,這里就不多說了。
這個純屬個人寫代碼的習慣,這習慣不科學。
Visual Studio 2017 Enterprise下載,可以看看https://www.coderbusy.com/archives/395.html,20多G,可安裝使用。
自行下載也可以,截止到8月20日,中文版下載更新到43G。
1、瀏覽器、區域簡潔滾動條;
2、多種彈出信息框
3、多場景左右鍵彈出菜單
VS2017編譯,如有錯誤或者NuGet有問題或需其他版本VS編譯,
只需建立新的WEB應用,將default.aspx、default.cs內容復制到你的文件內容里面。
C# WEB編寫方式比較自由,用此類方式寫代碼屬于個人習慣,
default.aspx中只定義js調用css樣式及一個空表格,內容添加由default.cs完成
比如:
protected void Page_Load(object sender, EventArgs e)
{
//定義表格
Table Table_Frame;
Table_Frame = new Table();
Table_Frame.BackColor = System.Drawing.Color.White;
Table_Frame.HorizontalAlign = HorizontalAlign.Center;
Table_Frame.Width = 1000;
Table_Frame.CellPadding = 0;
Table_Frame.CellSpacing = 0;
TableRow Table_FrameRow;
TableCell Table_FrameCell;
//自定義滾動條、彈出信息框
Table_FrameRow = new TableRow();
Table_FrameRow.Width = Unit.Percentage(100);
Table_FrameCell = new TableCell();
Table_FrameCell.ColumnSpan = 10;
Table_FrameCell.Height = 200; //高度
Table_FrameCell.Text = @"
<div id='os1' class='optiscroll column mid-50'>
自定義滾動條:<br>
1. 瀏覽器自定義滾動條;
2. 在本區域內自定義滾動條;
3. 點擊下面的項目,顯示提示信息。
<ul>
<li><a href='#' class='trigger-info'>Info</a></li>
<li><a href='#' class='trigger-success'>Success</a></li>
<li><a href='#' class='trigger-warning'>Warning</a></li>
<li><a href='#' class='trigger-error'>Error</a></li>
<li><a href='#' class='trigger-custom1'>Custom I</a></li>
<li><a href='#' class='trigger-custom2'>Custom II</a></li>
</ul>
</div>
<script type='text/javascript'>
var os1 = new Optiscroll(document.getElementById('os1'), { maxTrackSize: 20, preventParentScroll: true });
</script>
";
Table_FrameRow.Cells.Add(Table_FrameCell);
Table_Frame.Rows.Add(Table_FrameRow);
.........................
.........................
.........................
.........................
//添加到頁面
System.Web.UI.HtmlControls.HtmlTableRow HtmlTableRow = new System.Web.UI.HtmlControls.HtmlTableRow();
System.Web.UI.HtmlControls.HtmlTableCell HtmlCell = new System.Web.UI.HtmlControls.HtmlTableCell();
HtmlCell.Controls.Add(Table_Frame);
HtmlTableRow.Controls.Add(HtmlCell);
table_fence.Rows.Add(HtmlTableRow);
}
如需執行服務端,cs文件定義Button btn_log = new Button();隱藏不顯示,js用onclick指向btn_log的id的click,
cs文件里面定義protected void btnLog_click(object sender, EventArgs e){。。。執行內容}
等等,這里就不多說了。
這個純屬個人寫代碼的習慣,這習慣不科學。
Visual Studio 2017 Enterprise下載,可以看看https://www.coderbusy.com/archives/395.html,20多G,可安裝使用。
自行下載也可以,截止到8月20日,中文版下載更新到43G。
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Web;
using?System.Web.UI;
using?System.Web.UI.WebControls;
namespace?light_Bootstrap
{
????public?partial?class?_default?:?System.Web.UI.Page
????{
????????protected?void?Page_Load(object?sender?EventArgs?e)
????????{
????????????//定義表格
????????????Table?Table_frame;
????????????Table_frame?=?new?Table();
????????????Table_frame.BackColor?=?System.Drawing.Color.White;
????????????Table_frame.HorizontalAlign?=?HorizontalAlign.Center;
????????????Table_frame.Width?=?1000;
????????????Table_frame.CellPadding?=?0;
????????????Table_frame.CellSpacing?=?0;
????????????TableRow?Table_frameRow;
????????????TableCell?Table_frameCell;
????????????Table_frameRow?=?new?TableRow();
????????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????86511??2017-08-22?20:25??WEB_Bootstrap\.vs\config\applicationhost.config
????..A..H.?????30208??2017-08-22?20:22??WEB_Bootstrap\.vs\lightweight_Bootstrap\v15\.suo
????..A..H.?????39936??2017-08-22?21:49??WEB_Bootstrap\.vs\light_Bootstrap\v15\.suo
?????文件??????17920??2017-08-22?21:19??WEB_Bootstrap\light_Bootstrap\bin\light_Bootstrap.dll
?????文件????????598??2017-08-22?20:56??WEB_Bootstrap\light_Bootstrap\bin\light_Bootstrap.dll.config
?????文件??????13824??2017-08-22?21:19??WEB_Bootstrap\light_Bootstrap\bin\light_Bootstrap.pdb
?????文件??????50032??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\csc.exe
?????文件???????1711??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\csc.exe.config
?????文件???????1496??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\csc.rsp
?????文件??????13680??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\csi.exe
?????文件????????253??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\csi.rsp
?????文件?????105392??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\Microsoft.Build.Tasks.CodeAnalysis.dll
?????文件????4211112??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\Microsoft.CodeAnalysis.CSharp.dll
?????文件??????28088??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\Microsoft.CodeAnalysis.CSharp.sc
?????文件????2049432??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\Microsoft.CodeAnalysis.dll
?????文件?????128432??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\Microsoft.CodeAnalysis.sc
?????文件????5061040??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\Microsoft.CodeAnalysis.VisualBasic.dll
?????文件???????6908??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\Microsoft.CSharp.Core.targets
?????文件????1264912??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\Microsoft.DiaSymReader.Native.amd64.dll
?????文件?????967432??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\Microsoft.DiaSymReader.Native.x86.dll
?????文件???????6340??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\Microsoft.VisualBasic.Core.targets
?????文件??????20168??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\System.AppContext.dll
?????文件?????200440??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\System.Collections.Immutable.dll
?????文件??????22776??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\System.Diagnostics.StackTrace.dll
?????文件??????20696??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\System.IO.FileSystem.dll
?????文件??????20736??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\System.IO.FileSystem.Primitives.dll
?????文件?????425864??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\System.Reflection.me
?????文件??????50032??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\vbc.exe
?????文件???????1711??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\vbc.exe.config
?????文件???????1634??2016-06-27?14:50??WEB_Bootstrap\light_Bootstrap\bin\roslyn\vbc.rsp
............此處省略113個文件信息
- 上一篇:MVVM 入門級(WPF)
- 下一篇:歸并排序算法的
評論
共有 條評論