black.aspx
<%@ Page language="c#" Codebehind="black.aspx.cs" AutoEventWireup="false" Inherits="mima.black" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<title><%=Title%></title>
</head>
<body MS_POSITIONING="GridLayout">
<IFRAME src="<%=TargetAddress%>" width="100%" height="100%" FRAMEBORDER="0" SCROLLING="auto">
</IFRAME>
</body>
</html>
这一段是js
function ShowModeWin(sTitle,sFileName,w,h)
{
var sURL = "black.aspx?FileName=" + sFileName +"&Title=" + sTitle;
//我现在的问题是: 下面是出错信息: 分析器错误信息:未能加载类型 mima.black
//如果我把上边这段改成 //var sURL = sFileName; 不要 "black.aspx?FileName=" + +"&Title=" + sTitle;可以弹出页面,但这样在模态对话框一提交就会弹出新的窗口。 出了什么错,是不是 black.aspx.cs 写些什么代码,或者是编译环境没有调好,请帮帮我。
var nDialogWidth = w
var nDialogHeight = h;
var nLeft = (window.screen.availWidth-nDialogWidth)/2;
var n = (window.screen.availHeight-nDialogHeight)/2;
var sFeatures = "dialogLeft:"+nLeft+"px;dialog:"+n+"px;dialogHeight:"+nDialogHeight+"px;dialogWidth:"+nDialogWidth+"px;help:no;status:no";
var sReturnVal = window.showModalDialog(sURL,window,sFeatures) ;
}
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace mima
{
/// <summary>
/// black 的摘要说明。
/// </summary>
public class black : System.Web.UI.Page
{
public string Title="测试";
public string TargetAddress="http://dotnet.aspx.cc";
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
}
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
没有找到c#代码??
建议楼主从简单的开始学,稍复杂的以后自然就会了.
net_lover(孟子E章) 给结解答了,我也不说了.