1.用asp.net怎样写个登录注册怎么写,简单希望有个简单的源码案例,基于C#的目源码
2.请问哈,那能找到个简单的简单cdp源码整站ASP源代码,有基本的源码功能就可以,后台好操作,目源码labview模板匹配源码完整
3.利用ASP.NET制作35选7的简单代码是什么?
用asp.net怎样写个登录注册怎么写,希望有个简单的源码案例,基于C#的目源码
注册页面:
<head runat="server">
<title>注册</title>
</head>
<body>
<form id="form1" runat="server">
<div>
用户名:<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
密 码:<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br />
<asp:Button ID="Button1" runat="server" Text="注册" onclick="Button1_Click" />
</div>
</form>
</body>
</html>
代码:
public partial class Default7 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string username = this.TextBox1.Text.Trim();
string password = this.TextBox2.Text.Trim();
if(string.IsNullOrEmpty(username))
{
Response.Write("<script>alert('请输入用户名!!简单!源码');</script>");
return;
}
///链接数据库
///sql="insert into 表 (字段username,目源码字段password)values(username,password)";
///执行sql语句
Response.Write("<script>alert('注册成功');</script>");
}
}
登录跟注册差不多,就是简单itools查看程序源码将sql语句换成查询,如果有成功,源码否则失败
请问哈,目源码那能找到个简单的vip500源码整站ASP源代码,有基本的功能就可以,后台好操作,完整
第一个:
<tr>
<td colspan="2" align="left" valign="top" class="c">留言内容:<p><%=rs("connet")%></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" class="c" height="">
..............<a href="del.asp?opencv4.0源码id=<%=rs("id")%>" style="text-decoration: none"><font color="#">删除</font></a>.................<a href="reg.asp" style="text-decoration: none"><font color="#">我要留言</font></a>.........</td>
</tr>
把上面的改成
<tr>
<td colspan="3" align="left" valign="top" class="c">留言内容:<p><%=rs("connet")%></td>
</tr>
<tr>
<td colspan="3" align="left" valign="top" class="c" height="">
..............<a href="del.asp?id=<%=rs("id")%>" style="text-decoration: none"><font color="#">删除</font></a>.................<a href="reg.asp" style="text-decoration: none"><font color="#">我要留言</font></a>.........</td>
</tr>
第二个:
<!--header begin-->
<%
response.write "<div id=mainbox>"&_
"<table border=0 width=% cellpadding=4 style=border-collapse: collapse class='top_table'>"&_
"<form name=form action=Product_ListSearch.asp method=get>"&_
" <tr><td colspan=2 height=5></td></tr>"&_
" <tr>"&_
" <td><a href=index.asp title=返回首页><img src=uploadpic/></a></td>"&_
" <td align=right>"&_
" <table><tr><td class=cartimg></td><td><a href=Cart_List.asp>查看我的购物车</a>(<font color=#FF>"
if session("y")="" then response.write "0" else response.write session("y")
===================================
response.write "<td><a href=index.asp title=返回首页><object classid='clsid:DCDB6E-AE6D-cf-B8-' codebase='/pub/shockwave/cabs/flash/swflash.cab#version=6,0,,0' width='' height=''>"&_
"<param name='movie' value='logo.swf'>"&_
"<param name='quality' value='high'>"&_
"<embed src='logo.swf' width='' height='' quality='high' type='application/x-shockwave-flash' width='' height=''></embed></object></a></td>"
%>
希望我的回答对你有所帮助。
利用ASP.NET制作选7的代码是什么?
//=========================================================
//in7.aspx.cs
//=========================================================
using System;
using System.Collections;
using System.Configuration;
using System.Data;
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;
public partial class test_in7 : System.Web.UI.Page
{
Random rand;
protected void Page_Load(object sender, EventArgs e)
{
foreach (string s in select(7))
{
Response.Write(s + " ");
}
}
private string[] select(int count)
{
//获取随机数;
rand = new Random(count * unchecked((int)DateTime.Now.Ticks));
string[] outer = new string[count];
string[] lib = fillNumbers();
string temp = "";
int i = 0;
while (i < count)
{
//随机取出一个数
temp = lib[(int)rand.Next()];
//判断是否重复
//如果不存在
if (Array.IndexOf(outer, temp) < 0)
{
outer[i] = temp;
i++;
}
else
//重复则继续
continue;
}
//排序
Array.Sort(outer);
return outer;
}
/// <summary>
/// 填充待选字符数组
/// </summary>
/// <returns>字符串数组</returns>
private string[] fillNumbers()
{
string[] outer = new string[];
string temp = "";
for (int i = 1; i < ; i++)
{
if (i < )
temp = "0" + i;
else
temp = i.ToString();
outer[i - 1] = temp;
}
return outer;
}
}
//==============================================
//in7.aspx
//==============================================
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="in7.aspx.cs" Inherits="test_in7" %>
<!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//xhtml">
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
现给你编的,还热乎的呢。