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

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");
  try
  {
  conn.Open();
  string cmdText = "select username from userinfo where username = '" + this.txtUsername.Text.Trim() + "' and userpassword='" + this.txtPassword.Text.Trim() + "'";



  SqlDataAdapter sqlCommon = new SqlDataAdapter(cmdText, conn);
  DataSet ds = new DataSet();
   
  sqlCommon.Fill(ds);
  if (txtUsername.Text.Trim() == ds.Tables[0].Rows[0][" username"] && txtPassword.Text.Trim() == ds.Tables[0].Rows[0]["userpassword"])

  {
  conn.Close();
  Response.Redirect("Default2.aspx");
   
  }
  else
  {
  lblResults.Visible = true;
  lblResults.Text = "用户名或密码错误!";
  txtUsername.Text = "";
  txtPassword.Text = "";

  }
  conn.Close();


相关问答:

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>
  '' ......

jsp链接sql2000的疑问?



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

在asp.net里面脚本出错 - .NET技术 / ASP.NET

function CheckOpwd(){//验证用户名
var pwd=document.all.txtOpwd;

var div1=document.getElementById("divPwd");

if (pwd.value=="")
{
......

asp 调用java写的webservice - Web 开发 / ASP

在asp里怎么调用java写的webservice方法,有很多方法
- <message name="RtPnrIn">
  <part name="bstrPnrNO" type="s:string" /> 
  <part name ......

ASP伪静态 - Web 开发 / ASP

asp虚拟主机实现伪静态的方法:
1、 重写url参数
Step1: 建立前台文件index.asp,修改url参数形式。由于读取数据库中的记录不是专题的重点,故直接给出:
<!--#include file="config.asp" -->
&l ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号