奇怪的問題。我需要使用帶有ID的JavaScript數組,從數據庫中獲取更多信息,並使用ID作爲行ID。ASP相當於Ajax?
我需要再使用此附加信息,並將其發送給使用Ajax另一個文件(CSS),然後將利用這些信息來旋轉圖像。
除非我可以在同一文件中使用ASP經典,和ASP.NET(C#)? - 或者我可以使用或多或少相同的ASP代碼來訪問我的數據庫?
旋轉腳本
<%@ Page Language="C#" Debug="true" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Web" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
//string url = Request.QueryString["url"];
string url = @"C:\inetpub\wwwroot\testing\image.jpg";
string rotate_dir = Request.QueryString["dir"];
//create an image object from the image in that path
System.Drawing.Image img = System.Drawing.Image.FromFile(url);
//Rotate the image in memory
if (rotate_dir == "clockwise")
{
//Rotate clockwise
img.RotateFlip(RotateFlipType.Rotate90FlipNone);
} else if (rotate_dir == "anticlockwise")
{
//Rotate anti-clockwise
img.RotateFlip(RotateFlipType.Rotate90FlipXY);
}
//Delete the file so the new image can be saved
System.IO.File.Delete(url);
//save the image to the file
img.Save(url);
//release image file
img.Dispose();
}
</script>
我用它來訪問我的數據庫
'Create connection and load users database
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.ACE.OLEDB.12.0"
conn.Open Server.MapPath("/nightclub_photography/data/database/jamsnaps.mdb")
希望你明白我想要做什麼?
對不起,不,對我沒有意義。我看到你旋轉圖像,Asp Classic與此有什麼關係?數據庫是什麼? –
@HanletEscaño我覺得他沒有得到這樣的Asp.NET還支持ACCESS或舊格式的數據庫連接,並認爲他必須使用ASP的經典之作datafetching :( – Vogel612