Menu
http://cssmenumaker.com/builder/971316
Rdbtn, Ckbox, dplist
http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/example/
DatePicker
http://jqueryui.com/datepicker/
button
http://www.cssbutton.me
2013年10月13日 星期日
2013年10月8日 星期二
Byte Save as Image Files
byte[] FileBS;
FileStream BFile = new FileStream(FileLC, FileMode.Create);
BFile.Write(FileBS, 0, FileBS.GetUpperBound(0) + 1);
BFile.Flush();
BFile.Close();
FileStream BFile = new FileStream(FileLC, FileMode.Create);
BFile.Write(FileBS, 0, FileBS.GetUpperBound(0) + 1);
BFile.Flush();
BFile.Close();
2013年8月14日 星期三
Block during postback
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim sScript As String
'頁面執行 Submit 時顯示 blockUI
sScript = "$.blockUI();"
ScriptManager.RegisterOnSubmitStatement(Me, Me.GetType(), "blockUI", sScript)
'頁面載入時隱藏 blockUI
sScript = "$.unblockUI();"
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "unblockUI", sScript, True)
End Sub
Dim sScript As String
'頁面執行 Submit 時顯示 blockUI
sScript = "$.blockUI();"
ScriptManager.RegisterOnSubmitStatement(Me, Me.GetType(), "blockUI", sScript)
'頁面載入時隱藏 blockUI
sScript = "$.unblockUI();"
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "unblockUI", sScript, True)
End Sub
2013年4月25日 星期四
gridview + gridview
html
<asp:GridView ID="FileList" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" EnableViewState="False">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="Label1" runat="server" Text="展開"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:ImageButton ID="colImageButton1" runat="server" CommandArgument='<%# Eval("ID") %>' ImageUrl="~/img/webmaster/col.gif" OnClick="colImageButton1_Click" Visible='<%# vis(Eval("ID")) %>' CausesValidation="False" />
</ItemTemplate>
<ItemStyle Width="7%" />
<HeaderStyle Font-Size="10pt" CssClass="cell1" />
</asp:TemplateField>
...
...
...
</Columns>
</asp:GridView>
code
Protected Sub FileList_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles FileList.RowDataBound
If Not (ViewState("cID") Is Nothing) Then
If e.Row.RowType = DataControlRowType.DataRow Then
Dim drv As DataRowView = e.Row.DataItem
Dim OrderID As String = CStr(ViewState("cID"))
'判斷訂單編號相同的Row才要處理
If CStr(drv.Item("ID")) = OrderID Then
'產生新的GridViewRow
Dim gvRow As New GridViewRow(0, -1, DataControlRowType.DataRow, DataControlRowState.Normal)
'建立一個Cell
Dim lab1 As New Label
lab1.Text = "xxx"
tCell.Controls.Add(lab1)
'設定合併Cell
tCell.Attributes.Add("colspan", "6")
'Cell放入GridViewRow
gvRow.Cells.Add(tCell)
'GridViewRow放到GridView中
e.Row.Parent.Controls.AddAt(e.Row.RowIndex + 2, gvRow)
End If
End If
End If
End Sub
2013年4月3日 星期三
TextBox 提示輸入標記
<asp:TextBox ID="txtName" runat="server" Text="write here" OnFocus="javascript:if(this.value=='write here') {this.value=''}" OnBlur="javascript:if(this.value==''){this.value='write here'}" />
2013年3月28日 星期四
MySQL Select
Dim con1 As New MySqlConnection("server=localhost;Port=3307;user id=root;password=****;database=benchmark_database")
Dim sda1 As New MySqlDataAdapter("select * from class", con1)
Dim ds1 As New DataSet()
sda1.Fill(ds1)
My.Response.Write(ds1.Tables(0).Rows(0).Item(0))
2013年3月20日 星期三
訂閱:
文章 (Atom)