<%@ Page language="c#" Codebehind="getdate.aspx.cs" AutoEventWireup="false" Inherits="net1.getdate" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>getdate</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language=javascript>
function getdate(obj)
{
window.showModalDialog("returndate.aspx",obj,"dialogWidth:350px;dialogHeight:275px;help:no;center:yes;resizable:no;status:no");
}
</script>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<FONT face="宋体">
<asp:TextBox id="TextBox1" runat="server" ReadOnly=true onclick="getdate(this)"></asp:TextBox></FONT>
</form>
</body>
</HTML>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>getdate</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language=javascript>
function getdate(obj)
{
window.showModalDialog("returndate.aspx",obj,"dialogWidth:350px;dialogHeight:275px;help:no;center:yes;resizable:no;status:no");
}
</script>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<FONT face="宋体">
<asp:TextBox id="TextBox1" runat="server" ReadOnly=true onclick="getdate(this)"></asp:TextBox></FONT>
</form>
</body>
</HTML>
解决方案 »
- 连接oracle数据库的问题
- HTTP 错误 401.1 - 未经授权:访问由于凭据无效被拒绝
- 请教个WEB用户控件的问题
- 静态化处理
- 将普通的html控件转换成服务器控件后用findcontrol函数后如何做类型转换?
- vs2003上使用treeview,为什么会把所有的node全部显示出来,就像一个lable一样,没有分级别,请帮忙看看,谢谢!
- 自定义控件如何显示二进制的图片
- 大家看看这句是什么意思?
- 点击input type=file生成的文件上传框时,怎么控制弹出文件选择框的默认显示格式
- 怎么样去掉一个字符串中间的空格啊??
- "操作必须使用一个可更新的查询"如何解决?
- aspx界面中文本框无法显示的问题,请帮忙~~
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>returndate</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript">
function returndate()
{
var tempObj=window.dialogArguments;
tempObj.value=window.document.all.text1.value;
window.returnValue =window.document.all.SelectText.value;
window.close();
}
</script>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<FONT face="宋体">
<asp:Calendar id="Calendar1" runat="server"></asp:Calendar><INPUT type="button" value="Button" onclick="window.close();"></FONT>
<asp:TextBox ID="text1" Runat="server" style="DISPLAY:none"></asp:TextBox>
<asp:Button id="Button1" runat="server" Text="Buttond"></asp:Button>
</form>
</body>
</HTML>
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 net1
{
/// <summary>
/// returndate 的摘要说明。
/// </summary>
public class returndate : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox text1;
protected System.Web.UI.WebControls.Button Button1;
protected System.Web.UI.WebControls.Calendar Calendar1;
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.Calendar1.SelectionChanged += new System.EventHandler(this.Calendar1_SelectionChanged);
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load); }
#endregion private void Calendar1_SelectionChanged(object sender, System.EventArgs e)
{
string date= Calendar1.SelectedDate.ToShortDateString();
text1.Text=date;
} private void Button1_Click(object sender, System.EventArgs e)
{
Page.RegisterStartupScript("js1","<script>returndate();</script>");
}
}
}
运行后,用window.showModalDialog("returndate.aspx",obj,"dialogWidth:350px;dialogHeight:275px;help:no;center:yes;resizable:no;status:no");
打开了对话框,选择日期时,
他会怎么打开一个窗口,
新窗口的地址是
javascript:__doPostBack('Calendar1','1732')
请问各位大哥,大姐,这是什么原因
急
<base target="_self">
<body>2. change the script in returndate.aspx:<script language="javascript">
function returndate()
{
var tempObj=window.dialogArguments;
tempObj.value=window.document.all.text1.value;
window.returnValue =tempObj.value;//window.document.all.SelectText.value;
window.close();
}
</script>
与他无关
vb 的我不想看