易截截图软件、单文件、免安装、纯绿色、仅160KB

【ASP.net技巧】asp.net弹出窗口 返回值

刚刚 看到这么一个问题,这里也做个标记:http://topic.csdn.net/u/20080411/14/7b0f9da5-0413-4149-91e9-72c3df3018a3.html?seed=327251592
第一种方式:
//在Visual Studio 2008中调试通过
testPop_Page.aspx:主页面ASPX代码
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
   
    <script type="text/javascript" >
        function Pop()
        {
            var result = showModalDialog('testPop_downs.aspx', 'subpage', 'dialogWidth:800px;dialogHeight:600px;center:yes;help:no;resizable:yes;status:no'); //打开模态子窗体,并获取返回值
        document.getElementById("txt_id").value=result.split("'")[0]; //返回值分别赋值给相关文本框
        document.getElementById("txt_name").value=result.split("'")[1];
        document.getElementById("txt_pwd").value=result.split("'")[2];
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
 
            <asp:TextBox ID="txt_id" runat="server" ></asp:TextBox>
            <asp:TextBox ID="txt_name" runat="server" ></asp:TextBox>
            <asp:TextBox ID="txt_pwd" runat="server" ></asp:TextBox>
            <br />
            <asp:Button ID="btnPop" runat="server" Text="PoPWindows"  OnClientClick ="Pop()"
  &nbs


相关文档:

ASP.Net生成验证码

using System;
using System.Web;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
public partial class images_code : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string chkCode = string.Empty;
//颜色列表,用于验证码、噪线、噪点
Color[] col ......

ASP.NET常见错误及解决方法

在ASP.NET出现错误时,应该先检查ASP.NET环境是否正确搭建,比如以下几个方面:
1、是否安装相应版本的.NET Framework程序,并打好了补丁。
2、IIS是否安装运行正常,站点路径及ASP.NET版本是否配置正确。
3、在IIS WEB服务扩展中,是否允许了ASP.NET扩展。
4、是否有安全防护软件禁止向Windows和Temp文件夹写入文 ......

asp.net页面中动态地添加javascript脚本

最近的项目开发中 遇到一些需要根据具体情况动态添加javaScript脚本,然后执行脚本 于是收集了一下:
1 在控件的绑定事件中添加脚本 如:在gridview控件的rowdatabind事件中可以实现 指针的选中行不同色显示 可添加脚本
  protected void gvEngineerRepairState_RowDataBound(object sender, GridViewRowEventArgs e ......

ASP.NET(C#)返回上一页(后退)代码

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        ViewState["BackUrl"] = Request.UrlReferrer.ToString();
    }
}
/// <summary>
/// 返回按钮点击事件
/// </summary& ......

asp.net五大数据访问控件简单比较

数据绑定控件比较(Reapter\DataList\GridView\DatailsView\FormView):
1.插入功能方面:
DetailsView和FormView具有插入功能,其它控件没有
2.模板
DataList\FormView\Repeater三种必须编辑模板,而
GridView和DetailsView只有在将列转换成模板列以后才会出现各种模板.
3.自动分页功能
GridView ,DetailsView和FormView ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号