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

asp.net验证码制作实例代码

效果图
Default.aspx页面的内容
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Verify._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <img src="viewImg.aspx" />
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </div>
    </form>
</body>
</html>
Default.aspx.cs页面的内容
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace Verify
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            string text = this.TextBox1.Text.ToString();//获得用户输入的验证码
 


相关文档:

asp.net 获取当前URL的正确方法

HttpContext.Current.Request.Url.ToString() 并不可靠。
如果当前URL为
http://localhost/search.aspx?user=http://csharp.xdowns.com&tag=%BC%BC%CA%F5
通过HttpContext.Current.Request.Url.ToString()获取到的却是
http://localhost/search.aspxuser=http://csharp.xdowns.com&tag=&frac14;&fra ......

asp.net页面事件执行顺序及各事件作用

    protected void Page_Load(object sender, EventArgs e)
    {
    }
    #region OnPreInit 第一步
    protected override void OnPreInit(EventArgs e)
    {
        //检查 ......

ASP.NET页面传值_第八篇_WebConfig

+++ 修改WebConfig文件:
<?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="connStr" value="Data Source=ora11g;uid=scott;pwd=tiger;unicode=true"/>
  </appSettings>
  <connectionStrings>
    <ad ......

asp.net 打印 拒绝访问

参考 http://topic.csdn.net/t/20040510/19/3051316.html
      开始
      运行
      dcomcnfg
      组件服务一项中选择Dcom配置,找到Microsoft   excel应用程序,察看属性
      安全选项卡中,启动权限和访问权 ......

asp.net生成静态页的方法





1、直接将页面内容存在变量中后输出: 
 StringBuilder IndexContentResult= new StringBuilder(); //存放输出页面的HTML 
 IndexContentResult.Append("<html>\n"); 
 IndexContentResult.Append(&qu ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号