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 nTop = (window.screen.availHeight-nDialogHeight)/2;
var sFeatures = "dialogLeft:"+nLeft+"px;dialogTop:"+nTop+"px;dialogHeight:"+nDialogHeight+"px;dialogWidth:"+nDialogWidth+"px;help:no;status:no";
var sReturnVal = window.showModalDialog(sURL,window,sFeatures) ;}
<%@ 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 nTop = (window.screen.availHeight-nDialogHeight)/2;
var sFeatures = "dialogLeft:"+nLeft+"px;dialogTop:"+nTop+"px;dialogHeight:"+nDialogHeight+"px;dialogWidth:"+nDialogWidth+"px;help:no;status:no";
var sReturnVal = window.showModalDialog(sURL,window,sFeatures) ;}
你修改一下,
你的js没有问题啊!
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
{
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
}
}
TargetAddress
哪来的??
?
好象没编译
TargetAddress
哪来的??
这些是别人从别人 aspx 和 js 上copy下来的,没有找到c#代码;我编译过得,编译的时候也没有提示出错
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
}
}
建议楼主从简单的开始学,稍复杂的以后自然就会了.
net_lover(孟子E章) 给结解答了,我也不说了.
{
/// <summary>
/// black 的摘要说明。
/// </summary>
public class black : System.Web.UI.Page
{
public string Title="测试";
public string TargetAddress="http://dotnet.aspx.cc";
谢谢,这样可以打开了。再请教一下:
这一段是js
function ShowModeWin(sTitle,sFileName,w,h)
{
var sURL= "black.aspx?FileName=" + sFileName +"&Title=" + sTitle;
//我现在的问题是:怎么样把sFileName,sTitle 传过去,因为每次打开的窗口都不一样;现在打开的窗口都是http://dotnet.aspx.cc
var nDialogWidth= w
var nDialogHeight= h;
var nLeft= (window.screen.availWidth-nDialogWidth)/2;
var nTop= (window.screen.availHeight-nDialogHeight)/2;
var sFeatures= "dialogLeft:"+nLeft+"px;dialogTop:"+nTop+"px;dialogHeight:"+nDialogHeight+"px;dialogWidth:"+nDialogWidth+"px;help:no;status:no";
var sReturnVal= window.showModalDialog(sURL,window,sFeatures) ;}
?
没有找到c#代码??
建议楼主从简单的开始学,稍复杂的以后自然就会了.
net_lover(孟子E章) 给结解答了,我也不说了.我也想循序渐进,但是主管让我写一个公司自己用的,有点仓库管理,有稍微的oa,
还指定要用.net,我也只有先做,遇到不懂的就查资料,再问。
---------------------------------------
楼主,我建议过你了嘛,先把这个问题放一放,以后你自然就会了,你的问题问得很......很让人郁闷.....
一个接一个地问,要问就一次性的把问题说清楚,不要耽误大家的时间.
------------------------------------------------------------------
1.怎么样把sFileName,sTitle 传过去?
var sURL= "black.aspx?FileName=" + sFileName +"&Title=" + sTitle;这样不是已经传过去了?
在black.aspx的页面中Request.QueryString["FileName"]和Request.QueryString["Title"]就可以获得值了.
2.次打开的窗口都不一样;现在打开的窗口都是http://dotnet.aspx.cc
public string TargetAddress="http://dotnet.aspx.cc";这里设置为http://dotnet.aspx.cc了,你把它修改成你要的页面不可以了?不知道你要实现什么功能所以无法告诉你动态实现它.
......郁闷...郁闷......
public string TargetAddress="http://dotnet.aspx.cc";这里设置为http://dotnet.aspx.cc了首先谢谢你! 麻烦你再郁闷一下,然后你再在楼顶看看远处,看看天空,你会发现其实
真的很开阔、空灵!我要问的是public string TargetAddress="http://dotnet.aspx.cc" 怎样获得
TargetAddress 怎么样获得 sFileName; 具体的语法该怎么样写。
TargetAddress 怎么样获得 sFileName; 具体的语法该怎么样写。
-----------------------------
看不懂什么意思?你把你要实现的功能说一下吧,我来写一个简单的例子给你,这样搞下去很浪费时间的.
功能要说的具体,别让我不明白就可以了.