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

ASP.net 动态生成验证码的问题

在ajax的page_Load()里面, 假设我调用一个WebMethod获取了验证图片的 byte[] ,接下去该如何做,让一个已经存在的<img id=“code" />元素显示这个验证图片。谢谢!
通常都是放个iframe,然后把动态图片输出到这个iframe页上。
我感觉图片是个单独的资源,webmethod的方法应该是很难做的。
就是不用iframe至少也应该放到一个单独的处理页中,webmethod的输出毕竟是在同一个页中。

你获取的是byte[] 是图啊还是他的验证码啊?如果是图的话可否考虑使用ashx呢

没有分了 蹭个帖子。。。

我初学现在用三层架构,连mysql 就是连不上,谁有三层架构连的mysql的源码?或者给我写个示例(程序只要能连上mysql,就用label显示一个数据就行)我参考参考? 谢谢
邮箱:cafish@live.cn
谢谢!



定义一个回调函数
//生成验证码 再定义一个callback函数:
function callback(result){ //result中存放的是你生成验证码返回值
docment.getElmentById("img1").src = result;
}

//HTML代码中必须写个<img id ="img1"/>


就用img

<img src="生成验证码的url。返回一个image流。">


然后再这个页面checkCode.aspx上动态生成验证码:
C# code:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Configuration;
using System.Drawing;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
usi


相关问答:

asp.net分页问题

select top 12 * from Product where [id] not in (select top 12 [id] from Product)
这样可以分页,但是我在后面想加个条件
select top 12 * from Product where [id] not in (select top 12 [id] from Prod ......

asp.net中可输入的下拉框的问题 - .NET技术 / ASP.NET

Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.Design
Imports System.Web.UI.WebControls
Namespace CBDAspNet.WebControls.HTML
  ''' <summary>
  '' ......

ASP.NET表格弄得痛苦死了 - .NET技术 / ASP.NET

调整了这里,那里出问题。
有没有什么好的方法,像调整对话框一样????
找个专门做页面的

在dreamweaver里调。。。也可以直接控制HTML代码

确实痛苦 感同身受呀

哈哈 坚决路过。

用DW吧,VS搞设计 ......

数据表生成特定格式的xml - .NET技术 / ASP.NET

从数据库中查询一张表的数据
select 部门,姓名 from tb
如何才能生成下面的xml格式文件
<folder state="unchecked" label="全部">
  <folder state="unchecked" isBra ......

ASP链接SQL的简单登陆界面 - .NET技术 / ASP.NET

protected void btnLogin_Click(object sender, EventArgs e)
  {
  SqlConnection conn = new SqlConnection("Server = (local);user id = sa;pwd = 1;database = Login");
&nb ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号