asp.net URL傳遞中文參數的終極解決方案
自訂對話方塊控制項bate2
GridView 72般絕技
ASP.NET 2.0用戶端回調的實現分析javascript如何調用C#後代碼中的過程 和ASP.NET調用JS亂碼解決方案
http://blog.csdn.net/fanweiwei/archive/2006/10/18/1339365.aspx
+++++++++++++++++第一種情況:
1.後台方法:
protected string CsharpVoid(string strCC)
{
return strCC;
}
2.javascript 調用
<script language="javascript">
var s = "<%=CsharpVoid("www.esoutong.com")%>";
document.write(s);
</script>
+++++++++++++++++第二種情況:
1.後代碼:
protected void CsharpVoid()
{
string strCC = "www.esoutong.com";
Response.Write(strCC);
}
2.調用方法:CsharpVoid()
<script language="javascript">
document.write("<%CsharpVoid();%>");
</script>
你可在頁面中放一個按鈕,把它設定為不可見style="display:none",然後,用指令碼讓此按鈕點擊
document.all("button1").click();
在此按鈕的C#後台中寫事件代碼,這就是最簡單的指令碼調用C#方法.
Creating a Tabbed Interface for Displaying Parent/Child Data
Uploading Files in ASP.NET 2.0
Upload multiple files using the HtmlInputFile control
File Uploading to Access Database using ASP.NET (VB)
File Upload with ASP.NET
showModalDialog 開啟一個 aspx 頁面時,如果該頁面在之前已經開啟過一次,則自動會載入緩衝中的頁面,而不能顯示最新資料。
解決的辦法有兩種:
(1). 在開啟模態框時,給 url 後面多加一個隨機參數,來避免頁面被緩衝:
程式碼var url = 'EditFlowNode.aspx?flowId=0&id=2&x=' + Math.random();
var result = window.showModalDialog(url, '', 'status:no; help:no;');
(2). 在該 asp.net 頁面的 Page_Load 方法裡設定不緩衝:
程式碼protected void Page_Load(object sender, EventArgs e){
Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");
}
ASP快顯視窗總結