惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
宝玉的分享
宝玉的分享
量子位
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
GbyAI
GbyAI
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
Y
Y Combinator Blog
L
LangChain Blog
The Cloudflare Blog
T
The Blog of Author Tim Ferriss
U
Unit 42
Martin Fowler
Martin Fowler
aimingoo的专栏
aimingoo的专栏
G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客

博客园 - surprise

大家看一下这是.net的漏洞还是程序有问题,我一时也没搞清,只知道这问题挺怪的 - surprise - 博客园 一道Sql语句问题? 运用C#处理lob数据类型 (Oracle) 介绍一种Web上打印技术 Sql Server 中image类型迁移到Oracle 中Blob类型出现图片显示不出来,why????请博客们帮忙 在C#中存储Blob类型的数据, windows 2000下最多可以承受有多大容量外存???? 如何使用一个不错的图表组件WebChart(免费) 太爽了博客园有论坛了? 谁能帮我 WebChart组件的使用??? 能不能在博客园内建立一块开源区呀??? 如何在类库项目中添加配置文件?????? 中文版的hibernate pdf教程下载 用Nhibernate怎么实现数据的添加、删除、修改简单程序 介绍Nhibernate网站 俺现在碰到一些问题请大家帮忙??? 俺现在有个程序需要UTC转换为当地时间,哪位大虾会呀??? 我想问一下NHibernate的问题??? 10.1我发现一个非常好的架构NHibernate,我想和大家一起研究
首次使用Ajax
surprise · 2005-10-25 · via 博客园 - surprise
 

网上可以说对Ajax谈得热火朝天,最近也没什么项目就去看了一下,并写了个关于pop提示框的小程序

运行结果如下

文件说明

popwin.js:弹出提示框的js文件无须改动(这是公用的)

Ajax.dll  :这是Ajax组件

源代码
在Ajax中最可惜的是不能绑定DataGrid服务端控件
在用DataGrid时只能这么写

[Ajax.AjaxMethod()]
  public string  GetAjaxTable()
  {
   try
   {
    DataTable dt=new DataTable();
    SalesManagerQuery m_SalesManagerQuery=new SalesManagerQuery();
    dt=m_SalesManagerQuery.getSales();
    //DataGrid1.DataSource=dt;
    //DataGrid1.DataBind();

    //DataGrid dg = new DataGrid();
    dg.DataSource=dt;
    dg.DataBind();
    dg=DataGrid1;
    DataGrid1.Visible=false;
    System.Text.StringBuilder strb = new System.Text.StringBuilder();
    System.IO.StringWriter sw = new System.IO.StringWriter( strb );
    System.Web.UI.HtmlTextWriter htw = new HtmlTextWriter( sw );
    dg.RenderControl( htw );
    string s = strb.ToString();
    return s;
   }
   catch(Exception ex)
   {
    throw ex;
   }
  }