//方法1
<asp:label id="MessageBox" runat="Server" CssClass="test"/>
MessageBox.Text = "";
for (int i = 1; i <= 10; i++)
{
//方法1
<asp:label id="MessageBox" runat="Server" CssClass="test"/>
MessageBox.Text = "";
for (int i = 1; i <= 10; i++)
{
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
GridViewRow row = ((Button)e.CommandSource).Parent.Parent as GridViewRow;
string strIsPay = ((Label)row.Cells[6].FindControl("Label8")).Text.Trim();
}
做法是在 .aspx的html的最上面加上 MaintainScrollPositionOnPostback="true" 就搞定了
sample如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="default.aspx" MaintainScrollPositionOnPostback="true" %>
在ASP .NET中要動態變換CSS
第一種方法
需先在<head></head>加入
<link id="MyStyleSheet" rel="stylesheet" type="text/css" runat="server" />
<head>
由於朋友的家在遠方,所以不能夠當面去教學,我們就透過網路通訊工具來進行。前天,我第一次在網路上跟這個女孩互動。閒聊一會之後,我看到了問題所在。她對數學與物理很困擾,因為有一大堆的公式與符號,背來背去最後都混在一起了,結果考試時根本不知道該用那一個公式。所以這兩個科目,成績不只是不及格,還真的離及格分數有很大的一段距離。
萬事起頭難,我發現她的根本問題就在於「捨本逐末」,也就是一味的死背公式,但不解其背後的原由與道理。這樣一來,只要題目改了面貌,或是命題靈活了一些,馬上就不知所措,還容易發生張冠李戴的誤用情形。不過,這也是目前考試與升學掛帥下,學生常見的毛病。
<SCRIPT LANGUAGE="javascript">
<!--
window.open ('newPage.html', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no')
-->
</SCRIPT>
這個日期輸入法,可以輸入 / . -
例: 2008-1-3、2008/1/3、2008.1.3
無法輸入日期格式連續8碼的格式(例:20080101)
目前還沒找到可以輸入8碼卻又沒錯的方式
若有人找到或看到還請告知啦~~~
<input type="button" value="關閉窗口" onClick="window.opener=null;window.close();">
<a href=javascript:window.opener=null;window.close();>關閉窗口</a>
在Access裡的查詢設計裡
ALTER TABLE 表格名稱 ALTER COLUMN 自動編號 COUNTER (1, 1)