有关子窗体 大家好! 我现在有这样个问题,我在A页打开一个有返回值的子窗体B页以后,我执行代码的上传功能时,它又弹出一个B窗体,这是怎么回事,该怎样去解决? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在A页有个按扭点击事件:onclick="javascript:Composition.focus();var arr = showModalDialog('insertpic.aspx','', 'dialogWidth:280px; dialogHeight:300px; status:0;help:0');if (ar!=''){ FTB_InsertBR(this,'FreeTextBox1','<img src=\'imgs\\'+arr+'\'>');}"B页:public partial class insertpic : System.Web.UI.Page{ int CoId = 10; protected void upload_Click(object sender, EventArgs e) { string mpath = Server.MapPath(@"imgs/"); if (UploadFileName.FileName.Length == 0) { } else { try { if (Directory.Exists(mpath) == false) //若该目录不存在,创建该目录 { Directory.CreateDirectory(mpath); } string strtime = System.DateTime.Now.Year.ToString() + System.DateTime.Now.Month.ToString() + System.DateTime.Now.Day.ToString() + System.DateTime.Now.Hour.ToString() + System.DateTime.Now.Minute.ToString() + System.DateTime.Now.Second.ToString(); string filename = "CoId" + CoId + "popad" + strtime + "." + UploadFileName.PostedFile.FileName.Substring(UploadFileName.PostedFile.FileName.LastIndexOf(".") + 1); UploadFileName.PostedFile.SaveAs(mpath + filename); upfilename.Text = filename.ToString(); } catch(Exception ex) { Response.Write(ex); } } } } 数据源控件报int32与object类型不兼容,高手进来看一下怎么修改! 请教如何调用Jquery方法 后台的变量传到前台JS里面 asp.net自带的Ajax Control toolkit TextBox数值丢失一问~~~高手请进 ASP.net的问题 如果不使用 SQL Mail,如何在 SQL Server 中发送电子邮件 简单问题求助!!在线等,感谢各位大侠!! 关于一个按钮 装过framework之后原来的asp不能用了?这是为什么?急??? asp.net怎么才能在datagrid里做出表格效果 这个天气预报webserices怎么调用呀
{
int CoId = 10;
protected void upload_Click(object sender, EventArgs e)
{
string mpath = Server.MapPath(@"imgs/");
if (UploadFileName.FileName.Length == 0)
{ }
else
{
try
{
if (Directory.Exists(mpath) == false) //若该目录不存在,创建该目录
{
Directory.CreateDirectory(mpath);
}
string strtime = System.DateTime.Now.Year.ToString() + System.DateTime.Now.Month.ToString() + System.DateTime.Now.Day.ToString() + System.DateTime.Now.Hour.ToString() + System.DateTime.Now.Minute.ToString() + System.DateTime.Now.Second.ToString();
string filename = "CoId" + CoId + "popad" + strtime + "." + UploadFileName.PostedFile.FileName.Substring(UploadFileName.PostedFile.FileName.LastIndexOf(".") + 1);
UploadFileName.PostedFile.SaveAs(mpath + filename);
upfilename.Text = filename.ToString();
}
catch(Exception ex)
{
Response.Write(ex);
}
}
}
}